RE: [xsl] Multibyte language only error

Subject: RE: [xsl] Multibyte language only error
From: "Karen McAdams" <kamcadam@xxxxxxxxx>
Date: Wed, 31 May 2006 13:38:28 -0700
This code has been running in production without error against single
byte languages.

The problem is that when running lets say traditional Chinese the script
executes without problem and the parser does not see the whitespace
nodes as additional sequences.

When running against simplified Chinese (double byte) content the parser
sees whitespace as additional sequences.

This is also odd since the xsl and the xml are in Unicode.

Is behavior in accordance with the spec?


-----Original Message-----
From: Owen Rees [mailto:owen.rees@xxxxxx]
Sent: Wednesday, May 31, 2006 8:22 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] Multibyte language only error

--On Tuesday, May 30, 2006 15:15:45 -0700 Karen McAdams wrote:

> What I meant to say is that there is no other title element as a child
> that element. There are other nested elements that contain title
> children.

The quoted example is too large to verify by eye, and also seems to be a

cut/paste from what is visible with some editor that folds elements - it
not valid XML, and is not the complete example input.

Insert something like this before your '<xsl:variable name="title" ...'

<xsl:if test="title[2]">
  <xsl:message select="('second title', $level, title[2], name(),

If you get the message you do have more than one 'title' child in an
element that matches the template, ant the message will tell you where

If that does not find a problem in the input, try to simplify both the
and the XML input to produce a test case that exhibits the problem that
small enough to post in full.

Owen Rees
Hewlett Packard Laboratories, Bristol, UK

Current Thread