[Home] [By Thread] [By Date] [Recent Entries]
russurquhart1@xxxxxxxxxxx wrote:
Sorry about that. The xml would look like this: You code does make sense but you have not shown a complete sample where you don't get a result. For instance when I take your stylesheet <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:key name="target_ref_key" match="*[@Target]" use="@Target" /> <xsl:template match="CrossReference"> <xsl:variable name="unhash_name" select="substring-after(@href, '#')"/> <xsl:variable name="matched" select="key('target_ref_key', $unhash_name)"/> <xsl:if test="not($matched)"> No target for: <xsl:value-of select="$unhash_name"/> </xsl:if> </xsl:template> </xsl:stylesheet> and create a minimal input sample _with_ an element having a Target attribute, as in <root> <entry> <CrossReference xrefLabel="ADDF32 RaH, #16FHi, RbH" href="#ADDF32RaH16FRbH"/> <br Placement="line"/> <CrossReference xrefLabel="ADDF32 RaH, RbH, #16FHi" href="#ADDF32RaHRbH16F"/> </entry> <foo Target="ADDF32RaHRbH16F"/> </root> then Saxon 6.5 outputs No target for:
ADDF32RaH16FRbHSo something is different in your samples, you will need to post minimal but complete samples allowing us to reproduce the problem.
|

Cart



