[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Trying to select sibling nodes between two nodes

Subject: RE: Trying to select sibling nodes between two nodes
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sat, 9 Jan 2010 00:17:33 -0000
RE:  Trying to select sibling nodes between two nodes
It sounds as if the problems with your current code might be fairly trivial,
so show us the code and let's see if you're already 99% of the way there,
rather than starting again from scratch.

Having said that, I would normally tackle this using <xsl:for-each-group
group-starting-with="br"> rather than using the << and >> operators, which
are at a rather more primitive level.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 

> -----Original Message-----
> From: Ylvisaker, Steve [mailto:steve.j.ylvisaker@xxxxxxxxxxxxx] 
> Sent: 08 January 2010 22:13
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Trying to select sibling nodes between two nodes
> 
> 
> I have some unfortunate xml that I am trying to parse:
>  
> <label>first text<br/>second<emphasis>bold</emphasis> 
> text<br/>third text</label>
>  
> I need to transform this into:
>  
> <label>
>  <flowPara>first text</flowPara>
>  <flowPara>second<emphasis>bold</emphasis> text</flowPara>  
> <flowPara>third text</flowPara> </label>
>  
> Basically I need to select nodes between nodes in a "flat" 
> data progression. I can think of some ugly approaches that 
> would accomplish this but it seems I should be able to use 
> "<<" and ">>" to select nodes between occurrences of <br/>. 
> However, no matter how I attempt to use these operators the 
> result is a syntax error with "<" being illegal.
>  
> Can anyone point me to an example of how I can unflatten this xml?
>  
> Thanks in advance - Steve
> [CONFIDENTIALITY AND PRIVACY NOTICE]
> 
> Information transmitted by this email is proprietary to 
> Medtronic and is intended for use only by the individual or 
> entity to which it is addressed, and may contain information 
> that is private, privileged, confidential or exempt from 
> disclosure under applicable law. If you are not the intended 
> recipient or it appears that this mail has been forwarded to 
> you without proper authority, you are notified that any use 
> or dissemination of this information in any manner is 
> strictly prohibited. In such cases, please delete this mail 
> from your records.
>  
> To view this notice in other languages you can either select 
> the following link or manually copy and paste the link into 
> the address bar of a web browser: http://emaildisclaimer.medtronic.com

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.