XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Hans-Peter KüchlerSubject: SS5.3.179L: using references in xml
Author: Hans-Peter Küchler
Date: 18 Oct 2004 06:25 PM
Hi,

please have a look at the ZIP file. Open the peref.prj. There are two different named filegroups:
peref_ref.* and peref_element.*. Both XML files are using an external parameter entity, used in the external subset of the DTD.
The element <V> begins in peref_element.ent and ends up in peref_element.dtd.
The reference &amp; begins in peref_ref.ent and ends up in peref_ref.dtd.
peref_element.xsl will work as expected (with peref_element.xml) but peref_ref.xsl doesn't.
It has no practical importance for me, but I wonder why both case are handled different.

Btw. Saxon7 doesn't strip the text declaration from *.ent away. And have a look at xmlspy with both XML/XSL files;-)

regards, Hans-Peter Küchler


Unknownperef.zip

Posttop
(Deleted User) Subject: Re: SS5.3.179L: using references in xml
Author: (Deleted User)
Date: 20 Oct 2004 05:29 AM
Hi Hans-Peter,
the peref_ent.dtd is not a valid DTD because it splits an entity reference

across entities.

<!ENTITY txt "<![CDATA[%val;p;">

where %val; resolves to a string that ends with &am.

So, when the processors try to expand any entity found in the replacement
text, they find an invalid entity definition.

From the XML spec, § 4.5 "Construction of Entity Replacement Text"

[...]
The actual replacement text that is included (or included in literal) as
described above MUST contain the replacement text of any parameter entities

referred to, and MUST contain the character referred to, in place of any
character references in the literal entity value; however, general-entity
references MUST be left as-is, unexpanded
[...]

So the replacement text coming from the .ent file can contain general
entities that will be left untouched; but the &am string is just not
valid.

Hope this answers your doubts,
Alberto


 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

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