Hi Pete, Thanks for the response. You have correctly figured out what I mean. I tried the way you mentioned: 1. Now I have some variables in variables.xsl. 2. I include the variables.xsl file in my main xsl file. 3. Now I am free to use any variables in the variables.xsl file in my mail xsl file.
Thank you again! Peter Hancock-2 wrote: > > 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 > <[email protected]>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. >> > > -- View this message in context: http://old.nabble.com/Reading-into-xsl%3Avalue-of-directly-from-attributes-file-tp26473598p26490661.html Sent from the FOP - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
