Subject: Re: [xsl] xsltproc and multiple input files From: "Jon Gorman" <jonathan.gorman@xxxxxxxxx> Date: Mon, 10 Apr 2006 11:01:18 -0500 |
> xsltproc ../xslt/update-phys-interfaces.xsl /tmp/foo2.xml ../etc/server.xml So you're applying the transformation to both files and producing the result I believe. I'm not an expert in xsltproc. > I want to access elements in the first XML file from templates matching > elements in the second XML file. Ok, so if I'm picturing this right you would have two trees in memory and you want to process just one via the templates and use the other as some sort of reference. > I'd like to use syntax like this while > processing templates matching elements in the <server> node tree: > <xsl:when test="(physInterfaceBus = > //physDiscoveredInterfaceTable/physDiscoveredInterfaceTableRow/physDiscovered InterfaceBus)"> > rather than use the document() function to load a file directly. Ummm, well, you could use modes and documents to do what you want. But if you're not allowing the use of document I'm not sure that there's any way to do what you want. (Not that it's necessarily a bad idea) There might be a way to do this in XSLT 2.0. > Any help is greatly appreciated. If you're worried about not specifying the file name until runtime, you could do one of two things: pass the filename in as a parameter or generate the stylesheet and then run the xml input against it. So the param approach might be something like <xsl:value-of select='document($myfile)/foo/bar' /> If xsltproc does have the functionality two load in two XML docs at one time but you can't get it to work you might want to try the resources on their "Getting Help" page (http://xmlsoft.org/XSLT/bugs.html). ================================================================= For small problems you can try to get help on IRC, the #xml channel on irc.gnome.org (port 6667) usually have a few person subscribed which may help (but there is no garantee and if a real issue is raised it should go on the mailing-list for archival). There is also a mailing-list xslt@xxxxxxxxx for libxslt, with an on-line archive. To subscribe to this list, please visit the associated Web page and follow the instructions. ================================================================== If you want advice on how to do this via XSLT (most likely the document command you've already ruled out) this is the place to do it. If you're trying to figure out some sort of xsltproc-only behavior, some other resources might be more useful to you. Jon Gorman
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xsltproc and multiple input f, Eric White | Thread | [xsl] passing parameters to generic, Robert Frank |
[xsl] xsltproc and multiple input f, Eric White | Date | RE: [xsl] Getting a specific elemen, Michael Kay |
Month |