[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

Subject: Re: Specifying namespaces with prefixes or URIs (Was: Re: html tags in xml elements)
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Fri, 1 Mar 2002 11:23:13 +0000
targetnamespace means
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.