[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

question on paths

Subject: question on paths
From: Monosij Dutta-Roy <monosij.forums@xxxxxxxxx>
Date: Wed, 26 May 2010 18:11:04 -0400
 question on paths
Hello to all -

I am new to XSLT but not to data / programming. So I hope the
following makes sense:
Using XSLT 2.0, SaxonHE 9.2, JDK 1.6
I am trying to write a function that will test certain paths are valid
and keep them as variables before I use those paths to get child
nodes.
------------------------------

So I am using the function below and get an error on the line:
            <xsl: select="/n1:recordDocument/n1:recordTarget/n1:patientRole"/>
However if I use:
            <xsl: variable name="patientRole"
select="/n1:recordDocument/n1:recordTarget/n1:patientRole"/>
It is valid but do not return the path.

Of course this is valid as well:
            <xsl:value-of
select="/n1:recordDocument/n1:recordTarget/n1:patientRole"/>
But not what I need...
----------------------------------------
Your suggestions is very much appreciated.
Maybe what I am trying to do is just not the way to do in XSLT?
The function is below.
----------------------------------------
----------------------------------------
<xsl:function name="fnc:getRolePath">
    <xsl:param name="Version"/>
    <xsl:choose>
        <xsl:when test="$Version = '3.0'">
            <xsl:
select="/n1:recordDocument/n1:recordTarget/n1:patientRole"/> ***
        </xsl:when>
        <xsl:otherwise>UNDEFINED</xsl:otherwise>
    </xsl:choose>
</xsl:function>
----------------------------------------
----------------------------------------
Also I am running it from Ant 1.7 using Saxon Ant jar. is there any
way to make errors more descriptive?
Or is it a matter of the library - in this case Saxon?
Also any recommendations on Saxon vs Xalan in terms of running from
Ant or Maven? Btw can mavan be used pretty easily?
----------------------------------------
I have a couple of online books I am referencing, Doug Tidwell and Sal
Mangano and of course web but cannot find any suitable answer to all
the above.

Thank you

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.