xsl-list
[Top] [All Lists]

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

2012-08-16 08:58:55

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(_at_)nag(_dot_)co(_dot_)uk]
Sent: 16 August 2012 14:37
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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.
________________________________________________________________________

--~------------------------------------------------------------------
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>
--~--