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: Re: [docbook-apps] External entities to graphics lost during profiling


Hi,
It  seems the profiling stylesheets do resolve @entityref entity references 
during that stage of processing, since the entity declarations can't be 
copied by the XSLT profiling process (XSLT does not have access to the 
internal subset declarations).  This step is taken in 
profiling/profile-mode.xsl:

      <!-- Entity references must be replaced with filereferences for 
temporary tree -->
      <xsl:if test="@entityref and $profile.baseuri.fixup">
        <xsl:attribute name="fileref">
          <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
        </xsl:attribute>
      </xsl:if>

The $profile.baseuri.fixup parameter is set to true() by default, so this 
should be working for you.  You might try doing the two-step profiling to 
examine the intermediate results to see what kind of fileref values you are 
getting.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- 
From: "GUI Access" <guiaccess@covad.net>
To: <docbook-apps@lists.oasis-open.org>
Sent: Tuesday, February 05, 2008 11:28 PM
Subject: [docbook-apps] External entities to graphics lost during profiling


>I am using Saxon 6-5-5, DocBook XSL 1.73.2, and DocBook XML 4.5.
>
> External entities to graphics disappear when I profile a document.
>
> I declared an entity in a test document as follows:
>
>  <?xml version="1.0" encoding='UTF-8'?>
> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
> "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [
> <!ENTITY testgif SYSTEM "test.gif" NDATA GIF>
> ]>
>
> I then inserted a mediaobject that referenced the entity:
>
>  <mediaobject>
> <imageobject>
> <imagedata entityref="testgif" format="GIF"/>
> </imageobject>
> </mediaobject>
>
> The file test.gif is in the same directory as this document.
>
> If I profile this document with profiling/profile.xsl and since the 
> mediaobject element is not to be profiled out, it is copied verbatim to 
> the profiled document.  However, the external entity to test.gif is lost, 
> thus not making it possible to be passed onto HTML.
>
> I am using XML catalogs to resolve the DTD location.
>
> How can I fix this?
>
> Thanks.
>
> GUI Access
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
> 



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