[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

struggling with <xsl:analyze-string>

Subject: struggling with <xsl:analyze-string>
From: "Huditsch Roman" <Roman.Huditsch@xxxxxxxxxxxxx>
Date: Wed, 26 Jan 2005 16:10:43 +0100
xml inline style
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.