moshewe
moshewe

Reputation: 127

referencing a type from within an xsd pattern

I want to recognize all of my servers over my office network. They have a particular naming pattern which only I use. I've defined it in a simpleType. Now I was told I have to filter my servers from a list of full DNS names (like www.bla.moo.oneofmyservers.foo.loo). My naming strategy has a length limit. I would have simply put it inside a *mystrategy* if not for that.

Is there a way to reference my type from within a pattern definition?

It didn't work when I wrote *mytype*.

Upvotes: 1

Views: 79

Answers (1)

Petru Gardea
Petru Gardea

Reputation: 21638

Assuming that what you're asking is something like this:

I have a pattern and I've used it as a constraining facet in a simple type; now, I want to make another type, and for maintenance purposes, I wish to somehow reference that pattern, so that I don't have to maintain it in two different places...

The answer is no, you can't. Constraining facets in XSD are not referenceable entities; nor types are referenceable within constraining facets.

Upvotes: 1

Related Questions