[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
This might sound a little bizzare, but bear with me :-)
I have an XSLT which contains a document() function which calls a URI Resolver to obtain an XML instance. This instance is assigned to a variable at the start of the XSLT like this :-
<xsl:variable name="myDoc" select="document(myscheme:...)"/>
Some application software is calling my XSLT, and passing a single inbound XML instance.
Nothing unusual so far.
Unfortunately the way that the XSLT is called by the application, the XML instance that I really need to be the main input, and the instance that arrives via document() are the wrong way around :-(
I MAY (and may have to) be able to get a change to application software to re-orientate the data passed in and accessed via the resolver to be what I need, but before going down that route, I was just wondering whether there is anything I could consider within the XSLT itself.
I had thought of creating an additional variable and assigning this the input root and then just using both variables in expressions in a way which effectively would allow me to use the instance passed through the document() function as if it were the main input. I think this might work but it does seem a bit unnatural (if not a bit barmy).
Does this approach (or another) seem feasible or should I really stop messing about and get the application to pass data in a more appropriate way ?
Cheers
Fraser.
P.S Thanks to all for the excellent advice I've been getting from this group recently. Hopefully others are also benefitting from some of these Q&As.
Thanks
Fraser.
[xsl] Switching the main input Doc
Subject: [xsl] Switching the main input Doc From: "Fraser Goffin" <goffinf@xxxxxxxxxxx> Date: Wed, 23 Nov 2005 16:42:42 +0000 |
This might sound a little bizzare, but bear with me :-)
I have an XSLT which contains a document() function which calls a URI Resolver to obtain an XML instance. This instance is assigned to a variable at the start of the XSLT like this :-
<xsl:variable name="myDoc" select="document(myscheme:...)"/>
Some application software is calling my XSLT, and passing a single inbound XML instance.
Nothing unusual so far.
Unfortunately the way that the XSLT is called by the application, the XML instance that I really need to be the main input, and the instance that arrives via document() are the wrong way around :-(
I MAY (and may have to) be able to get a change to application software to re-orientate the data passed in and accessed via the resolver to be what I need, but before going down that route, I was just wondering whether there is anything I could consider within the XSLT itself.
I had thought of creating an additional variable and assigning this the input root and then just using both variables in expressions in a way which effectively would allow me to use the instance passed through the document() function as if it were the main input. I think this might work but it does seem a bit unnatural (if not a bit barmy).
Does this approach (or another) seem feasible or should I really stop messing about and get the application to pass data in a more appropriate way ?
Cheers
Fraser.
P.S Thanks to all for the excellent advice I've been getting from this group recently. Hopefully others are also benefitting from some of these Q&As.
Thanks
Fraser.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Replacing strings, Dimitre Novatchev | Thread | Re: [xsl] Switching the main input , David Carlisle |
Re: [xsl] Replacing strings, Sven Waibel | Date | Re: [xsl] Switching the main input , David Carlisle |
Month |