Welcome to WebmasterWorld Guest from 184.108.40.206
Forum Moderators: httpwebwitch
<?xml-stylesheet type="text/xsl" href="xstyle.xslt"?>
<content>more fascinating stuff</content>
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!
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)
Or... are you doing client-side XSLT?
Eventually I would be using PHP (or something else that's better?) but for now, I was just trying to see what I would need to do to make the library work, how to set it up, etc.
The file I was thinking about making its own xml file is a set of navigation links that would be used on some of the files, but not all.