xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Hancock <peter.hanc...@gmail.com>
Subject Re: Reading into xsl:value-of directly from attributes file
Date Mon, 23 Nov 2009 10:04:08 GMT
Hi Sangam,

Am I correct in thinking that you are after a way of specifying variables
externally?  Or are you refering to an attribute called 'file'?  Refering to
variables declared in external (from the main xsl) is straight forward as
the following example should show:

.xml
<root/>

.xsl
<xsl:include href='props.xsl' />
<xsl:template match='root'>
    <xsl:copy-of select="$color" />
</xsl:template>

props.xsl
<xsl:variable name="color" select='"red"' />

Aplying the stylesheet would yield

<?xml version="1.0" encoding="UTF-8"?>
red

If I am way off track here can you please try re-wording the problem and
perhaps provide a concrete example of what you want.

You may also like to try asking for help in an xslt-centric forum e.g
http://www.mulberrytech.com/xsl/xsl-list/index.html

Pete


On Mon, Nov 23, 2009 at 7:17 AM, Sangam Uprety <sangam.uprety@gmail.com>wrote:

> Hi all. I would like to read into a xsl:variable or xsl:value-of element
> directly from attribute file. For example, xsl:value-of
> select="value-from-attribute-file" Here, I don't want something like
> select="/myRoot/mynode", rather I would like to read this value from the
> attribute file, much like in fo:block
> xsl:use-attribute-sets="myAttrSetName". Although we can do this like in
> xsl:value-of select="/myRoot/mynode", it is sometimes very useful to have
> such values from attribute file, which means we would have added
> flexibility. Any ideas please? Thanks in advance!
> ------------------------------
> View this message in context: Reading into xsl:value-of directly from
> attributes file<http://old.nabble.com/Reading-into-xsl%3Avalue-of-directly-from-attributes-file-tp26473598p26473598.html>
> Sent from the FOP - Users mailing list archive<http://old.nabble.com/FOP---Users-f353.html>at
Nabble.com.
>

Mime
View raw message