XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] The prefix "fgdc" for element "fgdc:fgdc" is not bound

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@saxonica.com] 
Sent: Tuesday, December 11, 2007 1:26 PM
To: 'Anne Thomas Manes'; 'Timothy Lepczyk'
Cc: xml-dev@lists.xml.org
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/


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS