Subject: RE: [xsl] Pattern Matching in XSl - find groups defined in one Xml in another Xml. From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 29 Aug 2012 12:27:45 -0400 |
Regarding Ken's solutions from last Wednesday (repeated below), why is it :
<xsl:analyze-string select="$thisAlarm/@equipment" regex="^{$thisGroupedAlarm/@equipment}$">
<xsl:matching-substring>
<xsl:for-each select="regex-group(1)[normalize-space(.)]">
<xsl:attribute name="found-key" select="."/>
</xsl:for-each>
</xsl:matching-substring>
</xsl:analyze-string>
rather than
<xsl:analyze-string select="$thisAlarm/@equipment" regex="^{$thisGroupedAlarm/@equipment}$">
<xsl:matching-substring>
<xsl:attribute name="found-key" select="regex-group(1)"/>
</xsl:matching-substring>
</xsl:analyze-string>
?
What does the [normalize-space(.)] predicate do for us ?
-- Public XSLT, XSL-FO, UBL and code list classes in Europe -- Oct 2012 Contact us for world-wide XML consulting and instructor-led training Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: https://plus.google.com/116832879756988317389/about Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Pattern Matching in XSl -, Kerry, Richard | Thread | RE: [xsl] Pattern Matching in XSl -, Kerry, Richard |
RE: [xsl] Pattern Matching in XSl -, Kerry, Richard | Date | Re: [xsl] Pattern Matching in XSl -, Wendell Piez |
Month |