[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] result-document, QNames, AVT's, format-attribute and use-character-maps attribute


Subject: Re: [xsl] result-document, QNames, AVT's, format-attribute and use-character-maps attribute
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Thu, 14 Dec 2006 14:22:04 +0100

David Carlisle wrote:
however
the spec clearly shows this as an AVT so I think it's supposed to work.

It does work when I extend the AVT to contain a function: "{string('test')}" works, whereas "{'test'}" does not. Doesn't that struck you as odd?


well use-character-maps is again a reference to a stylesheet construct

I see. Imho, it would make more sense to have the character map as an AVT, and the format as fixed. No. Really, make them all AVT. But using the character maps would allow you to include an XSLT with a real bunch of handy character maps, and you just select one when needed, depending on the content of your input.


There's no way to do that without using an extension function.
(actually there is, you could specify that the file is in some
custom-encoding, but then you'd have to supply the encoding handler to

Come to think of it: I actually thought of that ;-) But it looked a bit awkward to me...

andxslt regexp could have been
used to clean out control characters,

Well, that was something I need more often than not, alas, because a lot of crap is send to the XSLT without filtering, and I cannot do anything once a control character is in it. Example: just extracting the non-control characters from some kind of email content type, would give me (largely) the content of that email. Which I can parse further in normal fashion. In Perl it is so easy to just write (and Ruby/PHP/Rebol etc):


$file =~ /[\x00-\x1F]*//;

but this was explictly raised and
they decided not to do it, you can't have everything:-)

They should've asked me in the board and I certainly would've convinced them otherwise ;-)



Current Thread
Keywords