Hi ,
Thanks for the help. The doc function finally worked , I had missed the xsl:version="2.0" tag in xhtml:html tag .
Regards,
Surabhi
| Erik Bruchez <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED] 11/23/2004 08:20 PM
|
|
I wonder if the doc() function cannot find the file and somehow does not
throw an exception. This said, you should be able to use relative paths
with the doc() function.
Try using an absolute path from the resources directory, e.g.
'oxf:/path-to-xml-file.xml'. If that doesn't work, also try something
like doc('oxf:/path-to-xml-file.xml')/* to see if something shows.
doc() is a standard XPath 2.0 function.
-Erik
[EMAIL PROTECTED] wrote:
>
> 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
> Please respond to
> [EMAIL PROTECTED]
>
>
>
> To
> [EMAIL PROTECTED]
> cc
>
> Subject
> Re: [orbeon-user] How to achieve localisation in orbeon
>
>
>
>
>
>
>
>
> [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
>
-------------------------------------------------------
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
