|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Specifying namespaces with prefixes or URIs (Was: Re: [x
Hi Peter, > <offtopic from="xslt"> > I've never actually used xs:any, but reading the schema spec had an example > with <xs:any namespace="##prefix"/>. Was I just reading it wrong? Thanks > for your explanation, btw. The XML Schema spec gives the following syntax: <any id = ID maxOccurs = (nonNegativeInteger | unbounded) : 1 minOccurs = nonNegativeInteger : 1 namespace = ((##any | ##other) | List of (anyURI | (##targetNamespace | ##local)) ) : ##any processContents = (lax | skip | strict) : strict {any attributes with non-schema namespace . . .}> Content: (annotation?) </any> http://www.w3.org/TR/xmlschema-1/#declare-openness The literal values ##any, ##other, ##targetNamespace and ##local aren't specifying prefixes, but are specifying special values: - ##any means any namespace at all - ##other means any namespace aside from the target namespace of the schema or no namespace - ##targetNamespace means the target namespace of the schema - ##local means no namespace Other namespaces fall under the 'anyURI' category, which is the namespace URI. So for example: <xs:any namespace="##targetNamespace ##local http://www.w3.org/1999/xhtml" /> Means any element from the target namespace of the schema, no namespace (local), or the XHTML namespace. I think that they chose keywords beginning with ## because you can't have URIs that start with ## (although you can have URIs that start with # - fragment identifiers). In XSLT, because we list prefixes instead, you can use #default for the default namespace - we can use only one # because unlike URIs, prefixes can't start with a #. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






