Calling document('') in a stylesheet containing xi:include

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Calling document('') in a stylesheet containing xi:include

Mats Eklund-2
Hi,

I have a version=1.0 xslt stylesheet with an xi:include:d lookup table that is used by the stylesheet via the document('') introspection technique. I load the stylesheet in my xpl with the oxf:url-generator and handle-xinclude=true. However, the document('') function returns the stylesheet document with the xi:include tag, i.e. without the included lookup table. Is there a way around this (for example resetting the base-uri somehow?)? If not, I'll have to upgrade to v2.0 or use exslt:node-set() function.

/Mats



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Calling document('') in a stylesheet containing xi:include

Alessandro  Vernet
Administrator
Mats,

I am not sure about XSLT 1.0, but in general, when we call XSLT from
XPL, we use another input for this type of "lookup table": you connect
that document to an input you call "lookup-table", and then access it
from XSLT with doc('input:lookup-table').

Alex

On Sat, Feb 27, 2010 at 1:13 PM, Mats Eklund <[hidden email]> wrote:

>
> Hi,
>
> I have a version=1.0 xslt stylesheet with an xi:include:d lookup table that is used by the stylesheet via the document('') introspection technique. I load the stylesheet in my xpl with the oxf:url-generator and handle-xinclude=true. However, the document('') function returns the stylesheet document with the xi:include tag, i.e. without the included lookup table. Is there a way around this (for example resetting the base-uri somehow?)? If not, I'll have to upgrade to v2.0 or use exslt:node-set() function.
>
> /Mats
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Calling document('') in a stylesheet containing xi:include

Mats Eklund-2
Ok. In my case, I have a stylesheet that I sometimes use on the server and somtimes on the client (hence version 1.0 where variables/parameters cannot be expected to carry nodesets). I prefer not to maintain two stylesheets. I found that by using a switch in the stylesheet that first tries loading the lookup table from the variable via node-set() function (works on the server with Saxon (exslt), and works in the client with IE (msxml)) and if not available uses the document('') approach (works in the client with real browsers (Firefox, Opera et al)).
 
Thanks,
Mats

--- On Mon, 3/1/10, Alessandro Vernet <[hidden email]> wrote:

From: Alessandro Vernet <[hidden email]>
Subject: [ops-users] Re: Calling document('') in a stylesheet containing xi:include
To: [hidden email]
Date: Monday, March 1, 2010, 11:18 PM

Mats,

I am not sure about XSLT 1.0, but in general, when we call XSLT from
XPL, we use another input for this type of "lookup table": you connect
that document to an input you call "lookup-table", and then access it
from XSLT with doc('input:lookup-table').

Alex

On Sat, Feb 27, 2010 at 1:13 PM, Mats Eklund <mats.eklund@...> wrote:

>
> Hi,
>
> I have a version=1.0 xslt stylesheet with an xi:include:d lookup table that is used by the stylesheet via the document('') introspection technique. I load the stylesheet in my xpl with the oxf:url-generator and handle-xinclude=true. However, the document('') function returns the stylesheet document with the xi:include tag, i.e. without the included lookup table. Is there a way around this (for example resetting the base-uri somehow?)? If not, I'll have to upgrade to v2.0 or use exslt:node-set() function.
>
> /Mats
>
>
>
> --
> You receive this message as a subscriber of the ops-users@... mailing list.
> To unsubscribe: mailto:ops-users-unsubscribe@...
> For general help: mailto:sympa@...?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>



--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet

-----Inline Attachment Follows-----


--
You receive this message as a subscriber of the ops-users@... mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@...
For general help: mailto:sympa@...?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws