Altova Mailing List Archives
>xml-dev Archive Home
>Recent entries
>Thread Prev - The prefix "fgdc" for element "fgdc:fgdc" is not bound
[Thread Next]
RE: [xml-dev] The prefix "fgdc" for element "fgdc:fgdc" is not bound
To: <xml-dev@-----.---.--->
Date: 12/12/2007 3:59:00 PM
I'm pretty sure that this has been explained to numerous newbies, but I have to ask again. I've been asked to "do something" about the Nunit test results schema, which starts out like this: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:complexType name="failureType"> ... What I understood Dr. Kay to be saying in other postings was that types *can't* be declared in the NsTDNSIN. An old bug report in the Nunit bug database complains that when the schema is loaded into an XML editor (in particular Visual Studio 2003), it doesn't seem aware of the types declared there, and doesn't recognize them in an nunit-test-results.xml file. I interpreted this to mean that the schema's declarations are basically thrown away, because it doesn't specify a namespace for them. For what it's worth, Visual Studio 2005 does recognize the declared types; I interpreted this as Visual Studio's free gift to lousy XML, and not as required behavior. What it comes down to is that there's no way of fixing Nunit's schema without breaking it: I can't add a namespace declaration at this point without breaking any non-schema-aware code that plenty of users have probably written (in particular, XSLTs that turn the test results into HTML), and if I want to process this XML in a schema-aware way, I'll have to tell the parser, "Hey, '' really means 'urn:nunit:org'!". Could I ask that any misunderstandings on my part be corrected? I'm trying to get this right without causing lots of trouble for a large user base. -----Original Message----- From: Michael Kay [mailto:mike@s...] Sent: Tuesday, December 11, 2007 1:26 PM To: 'Anne Thomas Manes'; 'Timothy Lepczyk' Cc: xml-dev@l... Subject: RE: [xml-dev] The prefix "fgdc" for element "fgdc:fgdc" is not bound > or if you prefer to make it clear to readers of the document that > these elements come from the FDGC metadata standard, you can assign > the fdgc prefix to no namespace: > > <fgdc:metadata xmlns:fgdc=""> > ... > </fgdc:metadata> > Sadly, no. XML Namespaces 1.1 allows the syntax xmlns:fgdc="", but it doesn't bind the prefix fgdc to the namespace-that-dare-not-speak-its-name, rather it makes the fgdc prefix unavailable for use. Michael Kay http://www.saxonica.com/
Disclaimer
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

