cancel
Showing results for 
Search instead for 
Did you mean: 

need help with XSL mapping.

Former Member
0 Kudos

i am trying to map a field from one structure to another.

i have done this using the following:

<SASIncidentNumber>

<xsl:value-of select="string($par0/@extension)"/>

</SASIncidentNumber>

however there could be more than one @exstension in the XML.

i only want to map the first one, and in XSL2.0 i could use distinct-value command.  however i cannot find anything similar in XSL1.0

also, i want to merge two fields within a node.  again, in XSL2.0 i can use a string-join, however in cannot find it in XSL1.0.

the code i have for that is:

<xsl:for-each select="ns0:ClinicalDocument/ns0:components/ns0:structuredBody/ns0:component/ns0:section/ns0:component/ns0:section/ns0:text/ns0@content">

<ClinicalSummary xmlns="">

<xsl:value-of select="string(.)"/>

</ClinicalSummary>

</xsl:for-each>

can someone help please?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

we have replaced the XSL with Java mapping

Answers (1)

Answers (1)

Former Member
0 Kudos

In order to select the first occurrence you could use

     <xsl:value-of select="string($par0[1]/@extension)"/>

To merge two string, use

     <xsl:value-of select="concat(.., ..)"/>