[Home] [By Thread] [By Date] [Recent Entries]
On 2011-05-20 17:52, Brandon Ibach wrote:
Generally, when you're doing string manipulations inside XSLT/XPath, there really is no such thing as ISO-8859-1, UTF-8 or any other encoding, since the "string" data type in XPath is just a string of Unicode characters. The encoding of the input is used to map the sequence of octets to Unicode characters on the way in and the requested encoding of the output is used to do the reverse on the way out. The XSLT code reads an XML document containing test cases for HTTP header fields using a variety of encoding styles, some of which are the ones I mentioned (either ISO-8859-1 or UTF-8, percent-escaped). The goal is to transform the escaped strings from the test cases to XSLT strings (Unicode sequences), essentially implementing the header field parsing in XSLT (yes, this is a proof-of-concept, nothing more). Best regards, Julian
|

Cart



