xsl-list
[Top] [All Lists]

Re: [xsl] Matching " within a variable as:item()*

2010-01-05 08:43:39
Thanks Martin and David for this explanation. Makes Sense!

Alex



On Tue, Jan 5, 2010 at 1:39 PM, David Carlisle 
<davidc(_at_)nag(_dot_)co(_dot_)uk> wrote:

It's not possible to reconstruct any example from the posted fragments
but one observation: these are not equivalent:


             <xsl:text>"</xsl:text>
           <xsl:value-of select="'ZXZX'"/>
           <xsl:text>"</xsl:text>


         <xsl:text>"ZXZX"</xsl:text>


The first makes a sequence of three text nodes, with values ", ZXZX and "

The second makes a single text node, with value "ZXZX"


in some circumstances (for example if you copy these to an element in
the result tree ) these things are equivalent, as text nodes are merged,
but in other cases, for example if you directly extract nodes such as
$VariableAsItem[1] then you will get different results.

The variable name VariableAsItem is a bit misleading as it suggests a
single item but it is typed as item()* allowing an arbitrary sequence.

David

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





-- 

Alex
https://sites.google.com/a/utg.edu.gm/alex

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--