Does XSLT cache doc function includes?

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

Does XSLT cache doc function includes?

Jim.Kirby
Hi,

I have an XSLT File that needs to insert unique numbers inside of an OID elements multiple times and in multiple places inside of a template.

i.e

<element1>
<OID>1001</OID>
</element1>
<element2>
<OID>1002</OID>
</element2>
<element1Ref>
<OID>1001</OID>
</element1Ref>

I have attempted to use a Form Runner App that uses the xforms:submission processor to read an OID from an exist collection then increments the number and writes it back to the collection which gives me a unique number everytime it runs. Then inside of the stylesheet I am using the following line to create OID variables.

<xsl:variable name="oid1" select="http://localhost:8080/orbeon/GetNextOID"/>
<xsl:variable name="oid2" select="http://localhost:8080/orbeon/GetNextOID"/>


The problem is that each variable gets set to the same OID. The form runner apps works correctly if run directly through the browser, so I am wondering does XSLT not pull the FR app each time and just uses the same value? Any help with this would be greatly appreciated.

Thanks,
Jim
Reply | Threaded
Open this post in threaded view
|

Re: Does XSLT cache doc function includes?

Erik Bruchez-3
Jim,

I think that XSLT imposes that a given URL resolves to the same
document. I.e. within an execution, doc('http://example.org/') is
guaranteed to return the same document. You could maybe add a
parameter to the URL, e.g. doc('http://example.org/?previous-id=1'),
then doc('http://example.org/?previous-id=2'), etc. to make the URL
unique.

-Erik

On Mon, Sep 14, 2009 at 2:09 PM, Jim.Kirby <[hidden email]> wrote:

>
> Hi,
>
> I have an XSLT File that needs to insert unique numbers inside of an OID
> elements multiple times and in multiple places inside of a template.
>
> i.e
>
> <element1>
> <OID>1001</OID>
> </element1>
> <element2>
> <OID>1002</OID>
> </element2>
> <element1Ref>
> <OID>1001</OID>
> </element1Ref>
>
> I have attempted to use a Form Runner App that uses the xforms:submission
> processor to read an OID from an exist collection then increments the number
> and writes it back to the collection which gives me a unique number
> everytime it runs. Then inside of the stylesheet I am using the following
> line to create OID variables.
>
> <xsl:variable name="oid1" select="http://localhost:8080/orbeon/GetNextOID"/>
> <xsl:variable name="oid2" select="http://localhost:8080/orbeon/GetNextOID"/>
>
>
> The problem is that each variable gets set to the same OID. The form runner
> apps works correctly if run directly through the browser, so I am wondering
> does XSLT not pull the FR app each time and just uses the same value? Any
> help with this would be greatly appreciated.
>
> Thanks,
> Jim
> --
> View this message in context: http://www.nabble.com/Does-XSLT-cache-doc-function-includes--tp25443709p25443709.html
> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.
>
>
>
> --
> 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
>
>


--
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