Subject: Re: [xsl] Dynamic variables? From: Michael Kay <mike@xxxxxxxxxxxx> Date: Sun, 28 Nov 2010 17:52:03 +0000 |
I want to remember those "style" definitions so I can emit appropriate code when they are referenced.
Michael Kay Saxonica
I think this may be addressed in the FAQ, under "what can't XSLT do," but I'm not sure I'm understanding it correctly, specifically the question about referencing a variable whose name is referenced as an attribute in the XML. For example, suppose the XML looks like this:
<styles> <style name="basic" typeface="Optima" weight="normal" slant="roman"/> <style name="emphatic" typeface="Optima" weight="bold" slant="italic"/> </styles> . . . <p style="basic">This paragraph contains some<span style="emphatic">emphatic</span> text.</p>
I want to remember those "style" definitions so I can emit appropriate code when they are referenced. Is there a way to create variables whose names come from the @name attribute of the style elements, and reference them later by those names?
Thank you,
-pd
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Dynamic variables?, Martin Honnen | Thread | [xsl] An approach to XSLT programmi, Dave Pawson |
Re: [xsl] Issue with Xalan nodeset, Martin Honnen | Date | [xsl] Limitations of including/impo, pankaj . c |
Month |