Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#9 XML parser disallows PE reference

trunk
open
Franck Arnaud
xml (4)
5
2007-12-01
2007-12-01
Colin Paul Adams
No

Given the following files:

id080.xsl:

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">

<?spec xslt#copy-of?>
<!-- AElfred parser bug - parameter entities in internal subset -->
<!-- (see XML source document) -->

<xsl:template match="/">
<xsl:copy-of select="*"/>
</xsl:template>

</xsl:transform>

id080.xml:

<!DOCTYPE census [
<!ENTITY % param1 "<!ELEMENT census (person)*>">
<!ENTITY % parext SYSTEM "xbug80.dtd">
<!ENTITY % param2 "person">
%param1;
%parext;
<!ELEMENT person (person)*>
<!ATTLIST person
name ID #REQUIRED
spouse IDREF #IMPLIED
job CDATA #IMPLIED>
]>
<census>
<person name="Bill" job="Teacher">
<person name="Joe" job="Painter" spouse="Martha">
<person name="Sam" job="Nurse">
<person name="Fred" job="Senator" spouse="Jane">
</person>
</person>
<person name="Karen" job="Doctor" spouse="Steve">
</person>
</person>
<person name="Mary" job="Pilot">
<person name="Susan" job="Pilot" spouse="Dave">
</person>
</person>
</person>
<person name="Frank" job="Writer">
<person name="Martha" job="Programmer" spouse="Joe">
<person name="Dave" job="Athlete" spouse="Susan">
</person>
</person>
<person name="John" job="Artist">
<person name="Helen" job="Athlete">
</person>
<person name="Steve" job="Accountant" spouse="Karen">
<person name="Jane" job="Doctor" spouse="Fred">
</person>
</person>
</person>
</person>
</census>

xbug80.dtd:

<!ENTITY % foo "dog">
<!ELEMENT %foo; EMPTY>

Then running the command:

gexslt id080.xsl id080.xml

Gives the following error message:

In :
Fatal error: http://www.gobosoft.com/eiffel/gobo/gexslt/extension#BUILD_ERROR: foo:1:1:PE reference only allowed in DTD

Discussion

    • assigned_to: nobody --> farnaud