[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Process following siblings that have no text into children.


Subject: RE: [xsl] Process following siblings that have no text into children.
From: "Kerry, Richard" <richard.kerry@xxxxxxxx>
Date: Thu, 16 Aug 2012 13:58:22 +0000

> first child column element is ''. But your sample input had no column
elements only column attributes.

Erm, not so, I think .....

My sample input was as follows (extract):

<row row="8">
<column column="1" cell="A8">Reference Standard</column>
<column column="2" cell="B8">0-11</column>
<column column="3" cell="C8">0=missing</column>
</row>

Thus I have column elements (within row), and also column attributes.  (I
agree that this may be confusing and I may change it)

I've done some more debugging and suspect the problem may be that the
preceding-sibling is not bounded by the context node.
ie.  when I do
select="following-sibling::element()[preceding-sibling::element()[column[1] =
'']]"
the following-sibling axis runs from the context node to the end of the
document, but the preceding-sibling axis doesn't just run back to my context
node and end there (which I thought it did), but right back to the beginning
of the document.  So I'm not just "looking back" to where I started and
terminating when there is text in column 1, I'm looking right back to the
start.

Or is that also wrong ?



Puzzledly,
Richard.

PPS.  I'm still not seeing my own messages on the list.  Is that normal or is
there a setting I need ?


________________________________________
From: David Carlisle [davidc@xxxxxxxxx]
Sent: 16 August 2012 14:37
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Cc: Kerry, Richard
Subject: Re: [xsl] Process following siblings that have no text into
children.

On 16/08/2012 11:22, Kerry, Richard wrote:
> ent()[column[1] = '']]" />

That is searching for  an element for which the string value of the
first child column element is ''. But your sample input had no column
elements only column attributes.

you meant the element to have column attribute equal 1 and heave no text
child which is

[@column=1 and not(text())]

David


--
google plus: https:/profiles.google.com/d.p.carlisle

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________


Current Thread