OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Wellformed?

[ Lists Home | Date Index | Thread Index ]

Just a quick sanity check I am tying to work on some conformance and want to
make sure I am correct:

The following is wellformed:
===================

<!DOCTYPE doc [
  <!ENTITY e "<foo bar1:att='att' bar2:att='att'>test</foo>">
]>
<doc xmlns:bar1="http://www.example1.org";
     xmlns:bar2="http://www.example2.org";>
  <child>&e;</child>
</doc>

But the following is not:
================
<!DOCTYPE doc [
  <!ENTITY e "<foo bar1:att='att' bar2:att='att'>test</foo>">
]>
<doc xmlns:bar1="http://www.example.org";
     xmlns:bar2="http://www.example.org";>
  <child>&e;</child>
</doc>


I have even tried:
===========
<!DOCTYPE doc [
  <!ELEMENT doc (child)>
  <!ATTLIST doc xmlns:bar1 CDATA #IMPLIED
                xmlns:bar2 CDATA #IMPLIED>
  <!ELEMENT child (foo)>
  <!ELEMENT foo (#PCDATA)*>
  <!ATTLIST foo bar1:att CDATA #IMPLIED
                bar2:att CDATA #IMPLIED>
  <!ENTITY e "<foo bar1:att='att' bar2:att='att'>test</foo>">
]>
<doc xmlns:bar1="http://www.example1.org";
     xmlns:bar2="http://www.example2.org";>
  <child>&e;</child>
</doc>

Basically, I am getting errors (even for the WF files) and the results are
all over the map. I knew that expansion of entity references (and WF
checking therein) was spotty-- but combine that with namespace scoping and
things get downright crazy. It seems that only Xerces handles this the way I
would expect... but then I am not sure that is right. The XML Rec claims
that the literal must be WF on it's own-- is that possible with a colon in
one of the attribute names (without a namespace decl?). Maybe the MSXML
parser which claims that there is an undeclared prefix is more correct.

Pointers to any documents exploring this are very welcome.

Thanks,
Jeff Rafter






 

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

Copyright 2001 XML.org. This site is hosted by OASIS