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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Entityref + docbookxsl: unparsed-entity-uri() does not resolve


Hello,

I'm experiencing a strange behaviour with entityrefs and docbook xsl.
Shortly, entityrefs do not get resolved (unparsed-entity-uri returns "")
when docbook xsl is imported, but works as expected if they are not
used. I've tried saxon and xalan, w/ xml-commons-resolver.. same behaviour.

For example, given the input file and the xsl below, this is what I get
when importing docbook xsl:
...
<uri-ref-test>
@testimage:
testimage: </uri-ref-test>
...
And this when I do NOT import it (import commented out):
...
<uri-ref-test>
@testimage: file:///home/diego/myimage.jpg
testimage: file:///home/diego/myimage.jpg</uri-ref-test>
...

I can't believe this would not work, so it must be something I'm doing.
Has anybody seen similar thing before?? Any hints how to solve or debug
this??

Thanks,
Diego

INPUT:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"; [
<!ENTITY testimage SYSTEM "/home/diego/myimage.jpg" NDATA JPEG>
]>
<book>
  <title>TestBook</title>
  <chapter>
    <title>ImageTest</title>
    <section>
      <title>ImageTest Section</title>
      <para>This paragraph should include the image pointed by entity
      'testimage': <inlinegraphic entityref="testimage"/></para>
    </section>
  </chapter>
</book>

CUSTOM LAYER XSL:

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet
 xmlns:fo="http://www.w3.org/1999/XSL/Format";
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
 version="1.0">
  <xsl:import
href="http://docbook.sourceforge.net/release/xsl/current/fo/profile-docbook.xsl"/>

  <!-- Debug template for inlinegraphic -->
  <xsl:template match="//inlinegraphic">
    <xsl:element name="uri-ref-test">
@testimage: <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
testimage: <xsl:value-of select="unparsed-entity-uri('testimage')"/>
    </xsl:element>
  </xsl:template>
</xsl:stylesheet>



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]