|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Global Variables (use of)
If I call an <xsl:variable> just after <xsl:stylesheet> as such:
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:saxon="http://icl.com/saxon"
extension-element-prefixes="saxon"
version='1.0'
saxon:trace="yes">
<xsl:variable name="sectnum"><xsl:value-of
select="child::title/attribute::id"/></xsl:variable>
$num should be processed as a global variable (my understanding through the
reading I have done).
The only thing that should be passed as values are the id attribute values
for title within chapters, sections, figures, and the book itself (the only
elements that have title as a child). Running this produces nothing
(running SAXON with XP). If I place this in the template for one of the
elements that contains a title, it evaluates correctly. If I need to build
a TOC where all the titles are reproduced as anchors with the id value as
the href, do I need to declare a unique variable in each template to make
this evaluate correctly, or is there a way I can use a global value that
will return the correct id value based on the current node being matched?
This is the toughest part of my project I have hit so far (other than
getting all these lousy java apps to work correctly). Any help will be
appreciated, and a solution will be showered with numerous accolades......
Thanks in advance....
Jason A. Buss
Single Engine Technical Publications
Cessna Aircraft Company
jabuss@xxxxxxxxxxxxxxxxxx
In 1992 the Web was a garden of personal home pages blooming with thoughts,
opinions, and life experiences. People were learning how to build their own
sites, experimenting with design, and sharing their voice with the world
while the business world scrambled for ways to "monetize" the internet and
capitalize on its fertility.
Then they paved it all and built a mall. -Biz Stone
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








