|
Subject: Re: [xsl] error in XSL file when using JAXP From: Rahil Qamar <qamar_rahil@xxxxxxxxxxx> Date: Thu, 28 Jul 2005 11:56:17 +0100 (BST) |
Thanks David and Michael
Okay at least I think I know where the problem is
arising now.
I have a section of code soon after the for-each loop
which tests for the common values present in both the
XML files imported at the start of the XSL.
The lines are:
-----------
<xsl:choose>
<xsl:when test="distinct-values($aVal[for $a in .
return
normalize-space($oVal)[contains(lower-case(.),lower-case($a))]])">
<xsl:variable name="matchingVals"
select="distinct-values($aVal[for $a in . return
normalize-space($oVal)[contains(lower-case(.),lower-case($a))]])"/>
<xsl:if test="not(empty($matchingVals))">
----------
Now the variable $matchingVals does not contain nodes
but common atomic values.
Is there any other way of writing out this test case
so that I can deal with the new version processor
requirements?
Note: $aVal and $oVal are -
----------
////$arch = File1.xml
////$ont = File2.xml
<xsl:variable name="aVal"
select="$arch/SubConcepts/SubConcept/Value"/>
<xsl:for-each select="$ont/SubConcepts/SubConcept">
<xsl:variable name="oVal" select="."/>
---------
Thanks
Rahil
--- David Carlisle <davidc@xxxxxxxxx> wrote:
>
> > Line 162 in the said file is :
>
> That is not the line with generating the error
> though. (Line numbering
> can easily be out due to vagaries in dos/unix line
> ends etc.
>
> The error means that you have something like
>
> test="zzzz" or ... [zzzzz] and zzz evaluates to a
> sequence whose
> first item is not a node but is a number or a string
> or some other
> atomic value. If the sequence doesn't consist of
> nodes then to use it
> as a boolean in a test it has to consist of a single
> item, which is a
> boolean value either true or false. If the sequence
> is a sequence of
> nodes then, as in xpath1 it will count as false if
> it is empty and true
> otherwise.
>
> David
>
>
>
________________________________________________________________________
> This e-mail has been scanned for all viruses by
> Star. The
> service is powered by MessageLabs. For more
> information on a proactive
> anti-virus service working around the clock, around
> the globe, visit:
> http://www.star.net.uk
>
________________________________________________________________________
>
>
___________________________________________________________
How much free photo storage do you get? Store your holiday
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] error in XSL file when us, David Carlisle | Thread | Re: [xsl] error in XSL file when us, David Carlisle |
| RE: [xsl] error in XSL file when us, Michael Kay | Date | Re: [xsl] error in XSL file when us, David Carlisle |
| Month |