Re: [xsl] String conversion problem when string is large

Subject: Re: [xsl] String conversion problem when string is large
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 21 Mar 2012 14:06:58 -0400
Hi Mike,

On 3/21/2012 1:52 PM, Michael Kay wrote:
In other words, if

<xsl:param name="string" as="xs:string">string</xsl:param>

is long for

<xsl:param name="string" select="'string'"/>
Well, there are other benefits in declaring the type. These two
constructs aren't equivalent, because in the first case the processor
knows that the value will always be a string, whereas in the second it's
only a string in the case where it's defaulted.

Okay, good.

we should see similarly that

<xsl:param name="string">string</xsl:param>

is another way of saying

<xsl:param name="string" as="document-node()">

Is this correct?
Yes, that's true.

-- Again, I take it, with the same caveat regarding the declared type of the parameter vs the type of a value assigned by default.

In any case, this should make it easier to explain how the notations are handled differently.


Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.      
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
  Mulberry Technologies: A Consultancy Specializing in SGML and XML

Current Thread