[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:54:25 -0400
 question on paths
Ok will try again. Appreciate all your responses before.

I am writing this function:
---------------
<xsl:function name="fnc:getPatientRolePath">
B B B  <xsl:param name="Version"/>
B B B  <xsl:choose>
B B B  B B B  <xsl:when test="$Version = '3.0'">
B B B  B B B  B B B  <xsl:
select="/n1:Document/n1:recordTarget/n1:patientRole"/>
B B B  B B B  </xsl:when>
B B B  B B B  <xsl:otherwise>UNDEFINED</xsl:otherwise>
B B B  </xsl:choose>
</xsl:function>
---------------
I am writing this function so as to create a variable patientRolePath
to hold the value: /n1:Document/n1:recordTarget/n1:patientRole.
This is because then I can use the variable name patientRolePath and
append child nodes and get required values such as:

$patientRolePath/id
$patientRolePath/lastName
$patientRolePath/firstName

However this that function I can't seem to write it to return with the path.
<xsl: select="/n1:Document/n1:recordTarget/n1:patientRole"/> is not valid
HOWEVER
<xsl:variable name="patientRole"
select="/n1:Document/n1:recordTarget/n1:patientRole"/>
written as a statement is valid. But does not return me anything.
OR
<xsl:value-of select="/n1:Document/n1:recordTarget/n1:patientRole"/>
is valid, but don't need the value of - just need the path.
---------------
Hope that explains it better?
I have written a few other functions so seem to be able to write functions.
Maybe it needs to be done with a node test?
Also just bought Michael Kay's book so looking forward to it as soon
as it reaches here from Amazon.

Also does XSLT have 'out' parameters? Or functions only way to achieve this?
---------------
Thanks again.

monosij

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.