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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Wellformed?

[ Lists Home | Date Index | Thread Index ]


----- Original Message ----- 
From: "Jeff Rafter" <lists@jeffrafter.com>
To: <xml-dev@lists.xml.org>
Sent: Tuesday, May 25, 2004 12:52 AM


> 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>

Yes, looks OK.

> 
> 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>

Duplicate attribute - not OK.
 
> 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>

Should be OK.

> 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?).

AFAIK, within DTDs namespaces have no meaning,
as there is no scope defined for a prefix mapping.

> Maybe the MSXML
> parser which claims that there is an undeclared prefix is more correct.

For which of the above?

Karl


  • References:
    • Wellformed?
      • From: "Jeff Rafter" <lists@jeffrafter.com>



 

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

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