simonchristieis
Programmer
Hi all,
I have an xml file and am transforming it using xsl.
Currently using msxml parser, will need to transform using Xalan-J (xerces parser)
Within this file I have included another xsl file that I am using as a data island, however, I want to try and access the data island with values from the xml document being transformed.
Erm yeah, that's clear !
Anyway, this code below works, I want to know if I can optimise this by getting rid of the variable.
what I want would look sommat like this :
Any ideas anyone ?
Thanks in advance.
Simon
I have an xml file and am transforming it using xsl.
Currently using msxml parser, will need to transform using Xalan-J (xerces parser)
Within this file I have included another xsl file that I am using as a data island, however, I want to try and access the data island with values from the xml document being transformed.
Erm yeah, that's clear !
Anyway, this code below works, I want to know if I can optimise this by getting rid of the variable.
Code:
<!-- grab the name of the variable -->
<xsl:variable name="type" select="local-name(IH:envelope/IH:body/IH:instrumentSnap/*[1])"/>
<!-- then look up the message type from data island -->
<xsl:value-of select="document('GenericData.xslt')/xsl:stylesheet/Generic:messagetype/Generic:MessType[@IHMessType = $type]/@CRSDataType"/>
what I want would look sommat like this :
Code:
<xsl:value-of select="document('GenericData.xslt')/xsl:stylesheet/Generic:messagetype/Generic:MessType[@IHMessType = local-name(document(.)/IH:envelope/IH:body/IH:instrumentSnap/*[1])]/@CRSDataType"/>
Any ideas anyone ?
Thanks in advance.
Simon