Re: [xsl] 'except' operator on atomic integer values

Subject: Re: [xsl] 'except' operator on atomic integer values
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Mon, 24 Dec 2007 18:58:01 +0530
Hi Colin,
   Thanks for the idea, but it doesn't seem to work for my example. I
tried this example:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="";

 <xsl:output method="text" />

 <xsl:template match="/">
  <xsl:variable name="seq1">
  <xsl:variable name="seq2">

  <xsl:value-of select="($seq1/one, $seq1/two, $seq1/three) except
($seq2/one, $seq2/two)" />



This produces output:
1, 2, 3

But I am expecting:

The problem I think is: $seq1/one and  $seq2/one are different nodes;
as they belong to different trees.

Do you have any ideas, how to resolve this issue?

Ken's technique (which I initially proposed) works for me. But I want
to explore the possibility of using 'except' operator for this

On Dec 24, 2007 4:41 PM, Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx> wrote:
> >>>>> "Mukul" == Mukul Gandhi <gandhi.mukul@xxxxxxxxx> writes:
>    Mukul> Is it possible to cast atomic values like integers above to
>    Mukul> a suitable node, so that except operator works on such data
>    Mukul> ?
> You can use a temporary tree.
> Something like:
> <xsl:variable name="integers">
>  <one>1</one>
>  <two>2</two>
>  <three>3</three>
> </xsl:variable>
> Now your set of 1,2,3 can be coded as:
> ($integers/one, $integers/two, $integers/three)
> --
> Colin Adams
> Preston Lancashire

Mukul Gandhi

Current Thread