Subject: Re: [xsl] Processing two documents, which order? From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 08 Apr 2011 14:14:33 +0100 |
15 minutes run time is good with that sort of comparison!
doc1 <x> <word>one</word> <word>two</word> <word>three</word> <word>threesome</word> <word>x-ray</word> </x>
doc2 <body> <p id="a">one hmmm not-one zzzzz three</p> <p id="b">a two one tone three</p> <p>zzz hhh aaa iii aaa x-ray hhh</p> </body>
<xsl:template match="node()"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template>
<xsl:template match="text()" priority="2"> <xsl:analyze-string select="." regex="[A-Za-z][a-z---]+"> <xsl:matching-substring> <xsl:choose> <xsl:when test="key('w',.,doc('doc1.xml'))"> <property> <xsl:value-of select="."/> </property> </xsl:when> <xsl:otherwise> <xsl:value-of select="."/> </xsl:otherwise> </xsl:choose> </xsl:matching-substring> <xsl:non-matching-substring> <xsl:value-of select="."/> </xsl:non-matching-substring> </xsl:analyze-string> </xsl:template>
________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Processing two documents,, Wolfgang Laun | Thread | Re: [xsl] Processing two documents,, Dave Pawson |
Re: [xsl] Processing two documents,, Wolfgang Laun | Date | [xsl] How to compare two QName valu, Costello, Roger L. |
Month |