Re: more struggles with POWDER test materials

Hi Cameron,

> Indeed you should be able to solve that (and anything computable) in
XSLT 1, since it’s a Turing complete language.

Yeah, you'ld need to be Turing himself to complete it though ;)

> Sure, and of course it would be a much better use of someone’s time to
just use XSLT 2 and its replace() function rather than rolling your own
in XSLT 1. 

Fully agree, and that along with no documented restriction not to use it in GRDDL was the reason for using it.

 Cheers
Kevin
Kevin Smith
 Vodafone R&D

----- Original Message -----
From: Cameron McCormack <cam@mcc.id.au>
To: Smith, Kevin, (R&D) VF-Group
Cc: phil@philarcher.org <phil@philarcher.org>; hhalpin@ibiblio.org <hhalpin@ibiblio.org>; connolly@w3.org <connolly@w3.org>; public-powderwg@w3.org <public-powderwg@w3.org>; www-tag@w3.org <www-tag@w3.org>
Sent: Fri May 15 10:39:09 2009
Subject: Re: more struggles with POWDER test materials

Hi Kevin.

Kevin Smith:
> Thanks for the snippet, which solves the problem as stated:
> however there was more to the problem than that: namely we need to
> regex-escape the string (not just deal with spaces). There may be
> a way to recurse on the string to achieve this: identify a segment
> before any of the regex reserved characters, concat() the escape,
> recurse until complete; but the problem there is that the escaped
> string still contains the reserved character. XSLT 1's translate()
> function can only cope with the translation of one character into
> another so that doesn't help us.

Indeed you should be able to solve that (and anything computable) in
XSLT 1, since it’s a Turing complete language.

> I wouldn't be surprised if one of the XSLT 1 gurus could find a
> heavyweight multi-template way around this; however it is exactly the
> sort of problem that replace() was introduced to deal with in XSLT
> 2.

Sure, and of course it would be a much better use of someone’s time to
just use XSLT 2 and its replace() function rather than rolling your own
in XSLT 1.  I’m quite enjoying using XSLT 2 at the moment for the SVG
WG’s spec building scripts.  I just wanted to point out that it’s not
impossible.

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Friday, 15 May 2009 09:58:14 UTC