[xep-support] Using: unparsed-entity-uri()

Steve Ylvisaker sylvisaker at CHYconsultants.com
Tue Apr 18 07:10:55 PDT 2006


I am trying, without success, to use the "unparsed-entity-uri()" 
function to resolve the file path for my graphics. I'm sure that I am 
missing something simple but it just isn't revealing itself to me.

Following is my doctype declaration:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document [
  <!ENTITY nbsp "&#160;">
  <!ENTITY ge "&#8805;">
  <!ENTITY le "&#8804;">
  <!ENTITY I1058374643JM SYSTEM "./data/EN1058374643JM-002" NDATA eps>
  <!ENTITY I1071003752JM SYSTEM "./data/EN1071003752JM-001" NDATA eps>
]>

<document>
<?Pub Lcl vendorprt="&nbsp;" outtype="draft" partrev="" hazlist="n" 
printspec="B" fosidate="2006-03-15" composetime="2006-03-26 13:34" 
dblnum="A07417-033" business="CRM"?>
<cover1>
.......

In the xml the graphic reference is as follows:

<graphic scale2fit="1" width="1.198in" height="1.560in" 
entityref="I1058374643JM" scaling_percent="30"/>

My style sheet is coded as follows: (note the "value-of" confirmation of 
"@entityref" as a debugging tool)

    <xsl:for-each select="graphic">
    <fo:block keep-with-next="always" text-align="center">
    <fo:external-graphic
        scaling="uniform"
        content-width="{(if (@scaling_percent = '30') then
                            (.3 * $pagewidth-mm)
                         else
                             if (@scaling_percent = '60') then
                                (.6 * $pagewidth-mm)
                            else
                                'error004')}mm"

        src="url('{unparsed-entity-uri(@entityref)}')"/>

<!-- Check to make sure we are hooking the data -->
        <fo:block>***<xsl:value-of select="@entityref"/>++4+</fo:block>

    </fo:block>
    </xsl:for-each>


The resulting FO is as follows:

<fo:block keep-with-next="always" 
text-align="center"><fo:external-graphic scaling="uniform" 
content-width="31.2mm" 
src="url('')"/><fo:block>***I1058374643JM++4+</fo:block></fo:block>


Any insight as to what I am missing would be very much appreciated.
Thanks in advance - Steve

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html



More information about the Xep-support mailing list