XML.com: XML From the Inside Out

XML.comWebServices.XML.comO'Reilly Networkoreilly.com
  Articles | Weblogs | Newsletter | Safari Bookshelf
advertisement

Article:
 Trickledown Namespaces?
Subject: couple of typos
Date: 2004-07-01 01:41:19
From: Brian Ewins

After: "Probably the most straightforward way to fix it is to add the appropriate prefixes to the title elements in test.xml..."


the sample has fa:title for both title elements, the second should be fb:title. There's also spurious semicolons in that fragment, immediately after each namespace declaration.


No Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • couple of typos
    2004-07-02 07:50:55 Brian Ewins [Reply]

    (typos nearly nailed - there's still this: <fb:title>I am in file'fb'</fa:title> <-- here)


    Sometimes the standards seem designed to create problems. A nasty feature of XML Namespaces that 'no prefix' doesn't mean 'default namespace', it means 'default namespace' OR 'no namespace', and the difference is important. Xml schema cements this by making elementFormDefault='unqualified' the default, which means this:


    <ns:foo xmlns:ns="some:schema-ns"><bar>Hello world</bar></ns:foo>


    ... is actually referring to 'bar' in the same schema as 'foo' (but /not/ the same namespace as foo - 'bar' has no namespace above). Or maybe it doesn't. You can't actually tell without resorting to the schema.


    As Humpty-Dumpty said to Alice: "When I use a word, it means just what I choose it to mean -- neither more nor less."

Sponsored By:


Contact Us | Our Mission | Privacy Policy | Advertise With Us | | Submissions Guidelines
Copyright © 2008 O'Reilly Media, Inc. | (707) 827-7000 / (800) 998-9938