This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

recursive problem with full path and position info


Given this XML:

<root>
  <a>
    <b>1</b>
    <b>2</b>
  </a>
  <a>
    <b>3</b>
    <b>4</b>
  </a>
</root>

I need to synthesize the following text output file:

root(1).a(1).b(1)='1'
root(1).a(1).b(2)='2'
root(1).a(2).b(1)='3'
root(1).a(2).b(2)='4'

How would you approach this problem? I do not know *any* of the tag
names ahead of time. I have an approach that works which matches
on the leaf nodes with child::*[not(child::*)] and crawls up, but
it is very slow and I don't think it is the correct approach. I 
think I need a strategy that matches from the top and decends.
Thanks in advance.

Regards,

Dan


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]