#8 XML parse fails to find general entity

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

Given the following file reluri18.xml:

<?xml version="1.0" standalone="no" ?>
<!DOCTYPE test [
<!ELEMENT test (extEnt)>
<!ELEMENT extEnt (sub2)>
<!ATTLIST extEnt attr CDATA #REQUIRED>
<!ELEMENT sub2 (#PCDATA)>
<!ENTITY extElement SYSTEM "level1/element.xml">
<!ENTITY extPI SYSTEM "level1/pi.xml">
]>

and in a directory named level1 in the same directory as reluri18.xml, the file pi.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<?pi data?>

the parser fails to find pi.xml in the level1 sub-directory. It gives the following error (via gexslt):

In :
Fatal error: http://www.gobosoft.com/eiffel/gobo/gexslt/extension#BUILD_ERROR: ?:1:1:Cannot open file /home/colin/TestSuiteStagingArea/TestInputs/reluri/level1/level1/pi.xml

to reproduce, run gexslt reluri18.xsl reluri18.xml

in the directory containing reluri18.xml.
Here is a file reluri18.xsl:

<?xml version="1.0"?>
<?spec fo#func-base-uri?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">

<!-- Test that a processing instruction may have a base URI distinct from its parent element -->

<xsl:output method="xml" indent="yes"/>

<xsl:template match="test">
<out>
<e><xsl:value-of select="substring-after(base-uri(*), '/TestInputs')"/></e>
<p><xsl:value-of select="substring-after(base-uri(processing-instruction()), '/TestInputs')"/></p>
</out>
</xsl:template>

</xsl:stylesheet>

Discussion

    • assigned_to: nobody --> farnaud
     
  • Logged In: YES
    user_id=732953
    Originator: YES

    The missing bit of reluri18.xml is:

    <test>&extElement;&extPI;</test>