[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Entity processing (was new msxml behaviour)

  • From: Richard Tobin <richard@c...>
  • To: Jim Gindling <jimg@d...>, "xml-dev@i..." <xml-dev@i...>
  • Date: Wed, 5 Nov 1997 17:38:51 GMT

amp msxml
>Could somebody post the result of parsing the files Tim Bray posted according 
>to spec since there seems to be some question as to whether or not msxml is 
>doing it properly.

Well here's what my XML parser makes of them.  It's *intended* to
parse according to spec :-)

-- Richard

EntVal.xml:

<?XML VERSION="1.0" ENCODING="ISO-8859-1" RMD="ALL"?>
<!doctype TEST [
<!ELEMENT test (#PCDATA) >
<!ENTITY % xx '&#37;zz;'>
<!ENTITY % zz '&#60;!ENTITY tricky "error-prone" >' >
%xx;
<!ENTITY example "<p>An ampersand (&#38;#38;) may be escaped
 numerically (&#38;#38;#38;) or with a general entity
 (&amp;amp;).</p>" >
<!ENTITY % pub    "&#Xc9;ditions Gallimard" >
<!ENTITY   rights "All rights reserved" >
<!ENTITY   book   "La Peste: Albert Camus, &#Xa9; 1947 %pub;. &rights;" >
<!ENTITY   rights " - all rights reserved - ">
]>
<TEST>
<E1>This sample shows a error-prone method.</E1>
<E2><P>An ampersand (&) may be escaped
 numerically (&#38;) or with a general entity
 (&amp;).</P></E2>
<E3>La Peste: Albert Camus, © 1947 Éditions Gallimard. All rights reserved</E3>
</TEST>

It also produces the following warnings:

Warning: Ignoring redefinition of entity rights
 in unnamed entity at line 13 char 47 of file:/home/richard/XML/EntVal.xml
Warning: start tag for undeclared element E1; declaring it to have content ANY
 in unnamed entity at line 16 char 4 of file:/home/richard/XML/EntVal.xml
Warning: start tag for undeclared element E2; declaring it to have content ANY
 in unnamed entity at line 17 char 4 of file:/home/richard/XML/EntVal.xml
Warning: start tag for undeclared element P; declaring it to have content ANY
 in entity "example" defined at line 7 char 1 of file:/home/richard/XML/EntVal.xml
 in unnamed entity at line 17 char 14 of file:/home/richard/XML/EntVal.xml
Warning: start tag for undeclared element E3; declaring it to have content ANY
 in unnamed entity at line 18 char 4 of file:/home/richard/XML/EntVal.xml

EntVal2.xml:

<!doctype FOO [
 <!ENTITY lt "&#60;">
 <!ENTITY  b "{Value of b}">
 <!ENTITY weird 'fo&#77;o&lt;bar'>
 <!ENTITY % d '{Value of d}'>
 <!ENTITY % defatt1 'DEF1 CDATA "{default 1}"'>
 <!ENTITY % bazatt '<!ATTLIST BAZ BIFF CDATA "QuidNunc" BAR CDATA "xyxy">'>
 <!ELEMENT FOO - - (#PCDATA|BAZ|BUM)*>
 <!ELEMENT BAZ - - (#PCDATA)>
 <!ELEMENT BUM - - (#PCDATA)>
 <!ATTLIST FOO BAR CDATA "A&b;C%d;E&#77;F">
         
 <!ATTLIST FOO BAR CDATA "Should not appear"> 
 %bazatt;
 <!ATTLIST BAZ %defatt1;> 
]>
<!--<FOO test='KL&#77;NO'>hi &lt;there--><FOO BAR="A{Value of b}C%d;EMF">
<BAZ BAR="A{Value of b}C%d;EMF" DEF1="{default 1}" BIFF="QuidNunc"></BAZ>
<BUM>foMo<bar</BUM>
</FOO>

Warnings:

Warning: Ignoring redeclaration of attribute BAR
 in unnamed entity at line 14 char 45 of file:/home/richard/XML/EntVal2.xml

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.