atom feed13 messages in net.sourceforge.lists.saxon-helpRe: [saxon] Problem with attribute va...
FromSent OnAttachments
Manfred StaudingerDec 15, 2008 3:09 pm 
Michael KayDec 15, 2008 3:34 pm 
Manfred StaudingerDec 15, 2008 4:00 pm 
Michael KayDec 15, 2008 4:14 pm 
Manfred StaudingerDec 15, 2008 4:20 pm 
Michael KayDec 16, 2008 1:57 am 
Andrew WelchDec 16, 2008 2:45 am 
Dave PawsonDec 16, 2008 2:56 am 
Michael KayDec 16, 2008 5:37 am 
Manfred StaudingerDec 22, 2008 8:22 am 
Michael KayDec 22, 2008 8:56 am 
Andrew WelchDec 22, 2008 9:06 am 
Michael KayDec 22, 2008 9:26 am 
Subject:Re: [saxon] Problem with attribute value templates
From:Michael Kay (mi@saxonica.com)
Date:Dec 15, 2008 3:34:50 pm
List:net.sourceforge.lists.saxon-help

This is caused by a bug in the version of Xerces shipped with JDK 1.6 (it corrupts attribute values reported to the application, especially in cases like this where there are multiple attributes on an element).

Please use the version of Xerces shipped by Apache, which is much more reliable.

-----Original Message----- From: Manfred Staudinger [mailto:manf@gmail.com] Sent: 15 December 2008 23:10 To: Mailing list for the SAXON XSLT and XQuery processor Subject: [saxon] Problem with attribute value templates

Hi,

select-ht-test.xsl: <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template name="init"> <doc> <xsl:for-each select="tokenize(unparsed-text('any'), '\r?\n')"> <xsl:variable name="temp" select="tokenize(., ' ')" as="xs:string+"/> <log h="{$temp[1]}" l="{$temp[2]}" u="{$temp[3]}" t="{$temp[4]} {$temp[5]}" m="{substring($temp[6], 2)}" q="{$temp[7]}" H="{substring($temp[8], 1, string-length($temp[8])-1)}" b="{$temp[10]}"/> </xsl:for-each> </doc> </xsl:template> </xsl:stylesheet>

With java net.sf.saxon.Transform -t -it init select-ht-test.xsl results in

Saxon 9.1.0.3J from Saxonica Java version 1.6.0_05 Error at log on line 14 column 21 of select-ht-test.xsl: XTSE0370: Closing curly brace in attribute value template "{$temp[10]}$temp[8], 1, string-length($temp[8])-1)}" must be doubled Failed to compile stylesheet. 1 error detected.

Regards, Manfred