Finding depth in output tree?
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 18
- Joined: Sat Aug 01, 2009 7:52 pm
Finding depth in output tree?
Hi all,
count(ancestor-or-self::*) yields your current depth in the input tree -- is there anything similar that will tell you at what level in the output tree the current template is generating tags? Or would this require some sort of precognition in the XSLT processor?
(I'm asking on behalf of an imported template, which doesn't necessarily know much about the transform that imported it.)
Thanks, --alex.
count(ancestor-or-self::*) yields your current depth in the input tree -- is there anything similar that will tell you at what level in the output tree the current template is generating tags? Or would this require some sort of precognition in the XSLT processor?
(I'm asking on behalf of an imported template, which doesn't necessarily know much about the transform that imported it.)
Thanks, --alex.
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Finding depth in output tree?
Hi,
Unfortunately there isn't a function or axis that tells you the depth of the output. One possible solution would be to keep the output in a variable instead of actually outputting it, and then analyze the contents of that variable. But this is not useful in your situation since you have an unaware template.
Regards,
Adrian
Unfortunately there isn't a function or axis that tells you the depth of the output. One possible solution would be to keep the output in a variable instead of actually outputting it, and then analyze the contents of that variable. But this is not useful in your situation since you have an unaware template.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 18
- Joined: Sat Aug 01, 2009 7:52 pm
Re: Finding depth in output tree?
Thanks! I've ended up being able to pass a parameter, which gets one added to it when calling apply-templates, but it's comforting to know that i wasn't missing something obvious. --alex.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service