[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: wordml to docbook (sect1-sect5)

Subject: Re: wordml to docbook (sect1-sect5)
From: Jon Gorman <jonathan.gorman@xxxxxxxxx>
Date: Tue, 6 Dec 2005 09:05:49 -0600
wordml docbook figures
I think you're making the problem more complicated than it actually
is.  Remember, XSLT isn't about "closing tags" and end tags.  It's
about using functional approaches to manipulating a node tree.  This
is somewhat of a generalization, but not an extreme one.

This seems to be just a variation of the the FAQ of node depth:
http://www.dpawson.co.uk/xsl/sect2/N2193.html.

So what you might want to do is to count the number of ancestor::w:p
or whatever you're creating the source from.

that is

<xsl:variable name="level" select='count(ancestor::w:p) + 1' />
<xsl:element name="sect{$level}">
...
</xsl:element>


Or am I  missing somthing?

Jon Gorman
ps. This is a bit of a pet peeve of mine, but I follow these messages
based on subject line/thread.  So if you're going to add information
when you have a currently existing thread, do it there, don't start a
new one.  No one has responded to your email so I figure you might
still need a response, but I don't like having to jump around a couple
of threads to do it.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.