[xsl] struggling with <xsl:analyze-string>

Subject: [xsl] struggling with <xsl:analyze-string>
From: "Huditsch Roman" <Roman.Huditsch@xxxxxxxxxxxxx>
Date: Wed, 26 Jan 2005 16:10:43 +0100
Hi

In my deepest hour of sorrows I write to you once more...
I just took a closer look to the <xsl:analyze-string> instruction.

XML fragment (I have no control of the structure as you can see ;)):

<par class="45_UeberschrPara" xml:lang="en" style="word-break-inside:
hyphenate; color: #000000; ">In-Kraft-Treten</par>
<par class="51_Abs" xml:lang="en" style="word-break-inside: hyphenate; ">
	<inline class="991_GldSymbol">' 2.</inline>
	<inline style="color: #000000;">
	<inline style="font-weight: bold;"> </inline>Diese Verordnung tritt mit
4. Jdnner 2005 in Kraft.</inline>
</par>
<par class="68_UnterschrL" xml:lang="en" style="word-break-inside: hyphenate;
color: #000000; ">Pribil	Traum|ller</par>


What I need to do:

I need to search in all nodes after par[@class='45_UeberschrPara'] for a date
in the Format "[DD]. [Mn] [YYYY]" and pass this date to a named template.
So far so good.

I thought that <xsl:analyze-string> would be the thing to use, so I tried:

<!-- I used <xsl:for-each> because <xsl:analyze-string> doesn't allow a
sequence with more than one item -->
<xsl:for-each select="part/section//*[preceding::par[@class='45_UeberschrPara'
and contains(., 'In-Kraft-Treten')]]">
	<!-- Until here everything works fine -->
	<xsl:analyze-string select="." regex="\d{4}">
		<!-- No output *sigh*. -->
		<xsl:matching-substring>
			<xsl:text>Hurra</xsl:text>
			<xsl:call-template name="get.date">
				<xsl:with-param name="text" select="."/>
			</xsl:call-template-->
		</xsl:matching-substring>
	</xsl:analyze-string>
</xsl:for-each>

As you can see, I tried it with a simplier regualr expression, but with no
success.
I suppose that the curly bracetts are giving my troubles...
Can you give my a hint, please?

wbr,
Roman

______________________________________

Roman Huditsch
IT and Electronic Publishing
LexisNexis ARD Orac
Marxergasse 25
1030 Vienna
Austria
ph: +43-1-534 52-1514
f: +43-1-534 52-140
e-mail roman.huditsch@xxxxxxxxxxxxx
www.lexisnexis.at

Current Thread