Re: Referring to instance data in a stylesheet

Posted by mjgraham on
URL: https://discuss.orbeon.com/Referring-to-instance-data-in-a-stylesheet-tp26988p26990.html

Hi,

This is not the behaviour I see: the page flow part for this xhtml page is:

<page id="publish" view="publish.xhtml" model="publish.xpl"/>

and the xsl elements in publish.xhtml act on the data from the model -
publish.xpl - and not the instance definitions in the xforms:model at
the top of publish.xhtml. BTW I am using OPS 3.0final.

    Cheers,

    Matthew

Ryan Puddephatt wrote:

>Matthew,
> To access the instance from XSLT just treat it as the root, so if
>you have the following
>
><xforms:instance id="type">
> <instance>
> <type>..</type>
> <type>..</type>
> <type>..</type>
> </instance>
></xforms:instance>
>
>The xsl would be
>
><xsl:for-each select="/instance/type">
> ...
></xsl:for-each>
>
>Hope this helps
>
>Ryan Puddephatt
>Web Developer
>TFX Group
>1 Michaelson Square
>Livingston
>West Lothian
>Scotand
>EH54 7DP
>
>* [hidden email]
>( 01506 407 110
>7  01506 407 108
>
>  
>
>>-----Original Message-----
>>From: Matthew Graham [mailto:[hidden email]]
>>Sent: 21 January 2006 03:12
>>To: [hidden email]
>>Subject: [ops-users] Referring to instance data in a stylesheet
>>
>>Hi,
>>
>>I have a xhtml page in which I am also declaring xsl:version="2.0" at
>>the top since I need to dynamically generate stuff based on the  output
>>of a pipeline. However, there are static elements that I am defining in
>>an xforms:instance at the top of the page and I was wondering how I can
>>access these in an xsl statement lower down:
>>
>><html xsl:version="2.0">
>><head>
>><xforms:models>
>><xforms:instance id="types">
>> <type>...
>> <type>...
>> ...
>></xforms:instance>
>>...
>></xforms:model>
>></head>
>><body>
>>...
>><xsl:for-each select="instance('types')">
>>...
>></xsl:for-each>
>></body>
>></html>
>>
>>   Cheers,
>>
>>   Matthew
>>



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws