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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--