|
Subject: [xsl] image path by unparsed-entity-uri() From: "JS rawat" <jrawat@xxxxxxxxxxxxxx> Date: Mon, 4 Oct 2010 15:10:56 +0530 |
Hi Team,
Can we get the appropriate path as describe in input by
unparsed-entity-uri().
XSLT
<xsl:template match="graphic">
<graphic>
<xsl:copy-of select="@id"/>
<xsl:if test="@fileref">
<xsl:attribute name="src"><xsl:value-of
select="@fileref"/></xsl:attribute>
</xsl:if>
<xsl:if test="not(@fileref)">
<xsl:call-template name="entifyref">
<xsl:with-param name="figname"
select="unparsed-entity-uri(@entityref)"/>
</xsl:call-template>
</xsl:if>
</graphic>
</xsl:template>
<xsl:template name="entifyref">
<xsl:param name="figname"/>
<xsl:attribute name="src"><xsl:value-of select="$figname"/></xsl:attribute>
</xsl:template>
input
<!DOCTYPE article abd.dtd"[
<!ENTITY F0001 SYSTEM ".\Fig\F0001.gif" NDATA GIF> ]>
<article>
<para><graphic entityref="F0001"/></para>
</article>
output
<book>
<p><graphic src="file:/d:/Jobs/xsl/abc/xslt/Fig/F0001.gif"/></p>
</book>
required output
<book>
<p><graphic src="./Fig/F0001.gif"/></p>
</book>
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] dateTime conversion, Christopher R. Maden | Thread | Re: [xsl] image path by unparsed-en, Michael Kay |
| Re: [xsl] dateTime conversion, Michael Kay | Date | Re: [xsl] image path by unparsed-en, Michael Kay |
| Month |