You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Pascal Bricard <pb...@sambatechnologies.com> on 2000/05/19 18:17:08 UTC
Xalan C++, document() and current() functions confusion ?
Hello,
I have tried the current() function like that :
...
<xsl:apply-templates select="current()"/>
...
with the TestXSLT.exe tool, and i got the error :
XSLException Type is : XSLException
Message is : The document() function requires at least one argument!
After this test, i tried to use an external XML file into a template with
the document() function :
...
<xsl:template match="/Identification/Patient/Nom">
<xsl:copy>
<xsl:value-of select="document('external_doc.xml')/Patient/Name"/>
</xsl:copy>
</xsl:template>
...
And i got the error :
XSLException Type is : XSLException
Message is : Invalid function name detected: document
With these 2 errors, i got the idea to try to replace document() function
by current() one :
...
<xsl:template match="/Identification/Patient/Nom">
<xsl:copy>
<xsl:value-of select="current('external_doc.xml')/Patient/Name"/>
</xsl:copy>
</xsl:template>
...
and it works well !!
Since the current() function should not accept any parameter, it sounds
like a little confusion between the 2 functions...
Thanks for help,
Pascal Bricard
pbricard@sambatechnologies.com
-
_____________________________________________________________
___
|_)_) Pascal BRICARD e-mail: pbricard@sambatechnologies.com
| |_) Phone : +33 (0) 4 76 04 00 54
SAMBA Technologies
Web : http://www.sambatechnologies.com
Fax : +33 (0) 4 76 04 15 98
Phone : +33 (0) 4 76 04 00 50
Address : 53 chemin du Vieux Chene 38240 MEYLAN FRANCE
______________________________________________________________