[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Using the 4 Great XML Namespace Attributes
On 01/09/2010 19:49, Costello, Roger L. wrote: > Hi Folks, > > This is an extension of the discussion of a couple days ago where we > discussed in-scope namespaces. It was noted then that the XML > namespace is implicitly declared in every XML instance document. This > message discusses how to use the 4 great attributes in the XML > namespace. I welcome your comments. /Roger > --------------------------------------------------- Enabling Use of > the Great XML Namespace Attributes > --------------------------------------------------- Recall that the > XML namespace (and the xml: prefix) is implicitly declared in every > XML document. Thus, XML documents are primed for dropping the > xml:lang attribute into any element, dropping the xml:id attribute > into any element, and so forth. > > While the XML namespace is automatically available in every instance > document, the attributes in it cannot be used unless you've > explicitly designed your XML Schema to allow their use. Here's what > you need to add to each element declaration: > > <anyAttribute namespace="http://www.w3.org/XML/1998/namespace"/> > > It says that any of the 4 great attributes from the XML namespace can > be dropped into the element. You assume without saying so that XSD schema is used. there is no need to use an XSD schema before a document is used (fortunately!). "cannot be used unless you've explicitly designed your XML Schema to allow their use" is rather misleading. Also more importantly you fail to mention the different status of the xml attributes. xml:lang and xml:space are defined in the XML Rec, so are available for use with any XML parser. xml:base and xml:id are defined in two separate specifications that systems may or may not implement, depending. David
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
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
|