RE: [xsl] Multibyte language only error

Subject: RE: [xsl] Multibyte language only error
From: "Karen McAdams" <kamcadam@xxxxxxxxx>
Date: Tue, 30 May 2006 11:51:19 -0700
Here is the code it is complaining about

Code:

<xsl:template match="*[contains(@class, 'topic/topic ')]">
        <xsl:variable name="level" select="count(ancestor::*[contains(@class,
'topic/topic ')]) + 1"/>
        <xsl:variable name="title" select="if ($level = 1) then concat(title,'
') else ' '"/>

<!-- other stuff goes here -->

</xsl:template>

Error:

XPTY0004: A sequence of more than one item is not allowed as the first
argument of concat()


Source:

topic DTDVersion="V1.1.3" class="- topic/topic" domains="(topic hi-d) (topic
pr-d) (topic sw-d) (topic adobe-d)"
id="WSBE3876ED-B3C6-44f4-815B-C795F32D8BDC">
  <title class="- topic/title">Adobe Help Center</title>
  <body class="- topic/body" />
- <concept DTDVersion="V1.1.3" class="- topic/topic concept/concept"
domains="(topic hi-d) (topic pr-d) (topic sw-d) (topic -d)"
id="WS1C637D50-636A-47ff-80C5-0339B082BAF0">
  <title class="- topic/title"> Help Center A$:8</title>
- <conbody class="- topic/body concept/conbody">
  </conbody>

-----Original Message-----
From: Michael Kay [mailto:mike@xxxxxxxxxxxx]
Sent: Saturday, May 27, 2006 7:56 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] Multibyte language only error

> I have an xsl that runs fine in several languages including
> zh-tw  but not  for ko-kr (Korean) and simplified Chinese
> (zh-cn). It chokes when it encounters xsl function such as
> "concat" or "normalize-space" and returns an error message
> that "A sequence of more than one item is not allowed as the
> first argument of normalize-space()"

This (Saxon) error message doesn't have any obvious relationship with the
language or character encoding of the input document. If you're supplying a
sequence of more than one item as an argument to the normalize-space()
function, then there is an error in your stylesheet, and if you showed us
the code we might be able to help you find it.

Michael Kay
http://www.saxonica.com/

Current Thread