and it pulls the contents of nav.xml in as plain text. But what I wanted was to pull it in as xml which can then be formatted with xstyle.xslt. I tried linking nav.xml to an xslt, but that didn't work either.
Is what I'm trying to do even doable? Or is this really simple and I'm messing something up? Thanks!
Msg#: 3803090 posted 4:07 pm on Dec 9, 2008 (gmt 0)
I understand what you're asking... I haven't looked for a way to do it with XSLT yet, because it's not a technique I'd instinctively employ so it's not in my day-to-day arsenal.
Given the same situation I'd parse the XML on the server and inject the extra XML before it's transformed. To wit, grab the XML and load it as a DOM object in PHP. Use XPATH to find all the <doc> elements, and loop through them. For each, get their @filename attribute. Then read the external XML and inject its nodes after (as siblings of) your <doc> element, then remove the <doc> element itself.
One question right off the bat - are you using PHP on the back end? If so, you're limited to using XSLT1, because there's no XSLT2 library for PHP (yet)