Hello All,
I'm running into an issue in my xslt where using the relative path resolves correctly but the absolute path does not.
Code:
The following is the sample xml:
<MittimusDocument>
<cicjis-mitt-ext:Case>
<cicjis-mitt-ext:CaseAugmentation>
<j:CaseDefendantParty>
<cicjis-mitt-ext:EntityPerson s:id="PER39176212">
<nc:PersonEyeColorText>Brown</nc:PersonEyeColorText>
</cicjis-mitt-ext:EntityPerson>
</j:CaseDefendantParty>
</cicjis-mitt-ext:CaseAugmentation>
</cicjis-mitt-ext:Case>
</MittimusDocument>
The following is a snippet of the xslt code to retrieve the PersonEyeColorText using absolute path that doesn't work:
<xsl:template match="cicjis-mitt-ext:Case">
<xsl:value-of select="normalize-space(cicjis-mitt-ext:CaseAugmentation/j:CaseDefendantParty/cicjis-mitt-ext:EntityPerson/nc:PersonEyeColorText)"/>
</xsl:template>
The following is a snippet of the xslt code that uses the relative path expression which does work:
<xsl:template match="cicjis-mitt-ext:Case">
<xsl:value-of select="normalize-space(//cicjis-mitt-ext:EntityPerson/nc:PersonEyeColorText)"/>
</xsl:template>
I am confused as to why the absolute path is not working. Am I missing something? The path looks correct to me. I'm wondering if this has to do with the way the cicjis-mitt-ext:EntityPerson is defined in the schema. In the schema, the j:CaseDefendantParty contains an abstract element called nc:EntityRepresentation and cicjis-mitt-ext:EntityPerson is substituted for this using substitutionGroup.
Any help is appreciated!! Thanks in Advance!