Subject: Annoying problem From: disco <disco@xxxxxxxxxxxxxxx> Date: Tue, 23 Nov 1999 22:04:51 -0500 (EST) |
Hi, This is an annoying problem which will hopefully be less annoying to those of you who haven't been banging your heads against it for the past few hours: I'm writing a transformation for my thesis, from XML to HTML. Part of the DTD states that sections may nest recursively within sections. Given any one of these sections or subsections as a context node, I'd like to be able to generate a "tumbler" for that node. For example: <section> <!-- 1 --> <section> <!-- 1.1 --> </section> <section> <!-- 1.2 --> <section> <!-- 1.2.1 --> </section> <section> <!-- 1.2.2 --> </section> </section> <section> <!-- 1.3 --> </section> </section> <section> <!-- 2 --> </section> I have been trying a lisp-style approach: given a "section" node, find its position relative to its section siblings, and concatenate that value (as a string) with that of its parent, and so forth until the parent is no longer a section node. While I'm fairly convinced this is the correct approach, I haven't been able to get it to work. I'd say I know XSLT and XPath fairly well but many intricacies of the languages are still new to me, so this is somewhat aggravating... Any help or ideas would be much appreciated. Thanks, Dan XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Announce: Upcoming XSL-related inst, G. Ken Holman | Thread | RE: Annoying problem, Mark Hayes |
Re: Difficulty with ISO-8859-1 enco, Michael Laing | Date | Diluted annoyances, disco |
Month |