Hi Erik,
I tried this peice of code in view.xsl:
<xsl:value-of select="doc('path-to-xml-file.xml')/strings/msg.top"/>
I have placed the path-to-xml-file.xml in same location where view.xsl is present. It did not print anything.
I even tried putting the the path-to-xml-file.xml in resource folder
<xsl:value-of select="doc('/path-to-xml-file.xml')/strings/msg.top"/>
Still it did not print anything.
To use "doc" command do I need to include something ?? Is something wrong in my understanding?
Regards,
Surabhi
| Erik Bruchez <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED] 11/23/2004 04:22 PM
|
|
[EMAIL PROTECTED] wrote:
> I need to separate out the label text form in a different xml file and
> use them .
instance() is not yet supported.
> path-to-xml-file.xml :
>
> <strings>
> <msg.top>Please complete the following questions:</msg.top>
> <label.term>Search:</label.term>
> </strings>
>
> Please suggest how do u I separate out the label data in different xml
> and refer them in the view.xml.
You can use an XSLT view instead of a raw XML file, and use the doc()
function to read you strings. Intead of writing:
<output ref="instance('strings')/msg.top"/>
Write:
<xsl:value-of select="doc('path-to-xml-file.xml')/strings/msg.top"/>
Or:
<xsl:variable name="strings"
select="doc('path-to-xml-file.xml')/strings"/>
<xsl:value-of select="$strings/msg.top"/>
This is a better solution than what I suggested in my previous email
(namely grouping everything under a single XForms model).
-Erik
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
orbeon-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/orbeon-user
