W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2007

RE: XSD 1.1 Proposal: Naming wildcard extension sites

From: Michael Kay <mike@saxonica.com>
Date: Mon, 12 Mar 2007 11:41:53 -0000
To: "'Bryan Rasmussen'" <BRS@itst.dk>, "'Pete Cordell'" <petexmldev@tech-know-ware.com>, <xmlschema-dev@w3.org>
Message-ID: <00c701c7649b$6ef70760$6401a8c0@turtle>

> Basically what 
> I need is the ability to say I want any namespace with a 
> particular structure to it, and I suppose it would be best 
> served by using the regular expressions ability of XSD.
> 
> We would find it a boon and a blessing to say that any 
> namespace is allowed inside of an extension element as long 
> as it starts with rep.oio.dk. 

In XML Schema 1.1* (and in the next Saxon release) you will be able to say

<xs:assert test="starts-with(namespace-uri(*[last()]), 'rep.oio.dk'))"/>

* (actually the current W3C draft defines a rather restrictive XPath subset
for assertions. But it allows processors to implement the whole of XPath
2.0, and that's what Saxon will do.)

I think xs:assert is going to prove an immensely popular feature, assuming
that vendors don't cripple it to the extent suggested in the current draft.
For this particular use case it's a bit awkward that you can only put
xs:assert on a complex type - not on the element wildcard itself - but it's
not too hard to work around that.

Michael Kay
http://www.saxonica.com/
Received on Monday, 12 March 2007 11:42:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:41 UTC