This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
RE: [docbook-apps] Website+XSLT=source filename?
- From: "Sina Heshmati" <sina at khakbaz dot com>
- To: admin at buddhalinux dot org, admin at buddhalinux dot org, docbook-apps at lists dot oasis-open dot org
- Date: Wed, 23 Feb 2005 13:20:45 -0500
- Subject: RE: [docbook-apps] Website+XSLT=source filename?
- Reply-to: "Sina Heshmati" <sina at khakbaz dot com>
Thomas,
Try this expression:
"$autolayout/autolayout//*[@id=$id]/@page" in a template that matches 'webpage'.
Sina
>----- ------- Original Message ------- -----
>From: admin@buddhalinux.org
>To: docbook-apps@lists.oasis-open.org
>Sent: Tue, 22 Feb 2005 21:50:15
>
>How does one go about finding out the XML source
>filename in XSL?
>
>I tried to utilise the document-uri function of XSL
>2.0; but am getting an
>error (probably from the xsltproc processor) about
>only being version 1.0
>capable.
>
>I currently have successfully been using the
>following:
>
><snip>
><xsl:variable name="page" select="."/>
><xsl:variable name="xml_source">
> <xsl:choose>
> <xsl:when
>test="$page/config[@param='source']">
> <xsl:value-of
>select="($page/config[@param='source'])[1]/@value"/
>>
> </xsl:when>
> <xsl:otherwise>
> <xsl:text>index.xml</xsl:text>
> </xsl:otherwise>
> </xsl:choose>
> </xsl:variable>
></snip>
>As you can see, I am having to generate a specific
>element to hold the source
>filename. But, given the volume of pages that I am
>constructing(4,000+); I
>would rather utilise a construct during
>transformation so that I don't need
>to alter the XML sources and add this element.
>
>Thanks,
>Thomas