Re: [xsl] csv to xml converter bug

Subject: Re: [xsl] csv to xml converter bug
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Tue, 10 Jul 2007 15:06:49 +0100
On 7/10/07, Michael Kay <mike@xxxxxxxxxxxx> wrote:
The construct

(?=X)

is allowed in some regex dialects, it means "match X with a zero-width
positive lookahead". But it's not allowed in the XPath regex dialect. This
is basically an assertion that X must match at the current position, without
causing X to be swallowed.

This construct (a zero-width negative lookahead) isn't allowed either:

(?!X)

This is the inverse: it asserts that X does not match at the current
position, without swallowing X.

I'm afraid I have no idea whether these constructs can be translated into
anything that the XPath regex dialect permits.

Gunther Schadow can say "told you it would be needed":
http://www.stylusstudio.com/xsllist/200412/post00810.html

Thanks for the explanation. Haven't heard from Gunther for a while...


The page gets quite a few hits so I think there is demand for a
de-facto csv-to-xml solution in XSLT... Hopefully someone skilled in
the dark arts of regex can fix the bug in the existing solution, or
perhaps convert the unsupported regex into something that is.

It certainly falls into the "rock hard" category of problems.

--
http://andrewjwelch.com

Current Thread