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

Fwd: Removing blank lines in text output

Subject: Fwd: Removing blank lines in text output
From: "Greg Groves" <greg.groves@xxxxxxxxx>
Date: Tue, 6 Mar 2007 09:23:38 -0500
 Fwd: Removing blank lines in text output
Hmm.... didn't see this is in the archive, so I'm reposting...

---------- Forwarded message ----------
From: Greg Groves <greg.groves@xxxxxxxxx>
Date: Mar 5, 2007 3:19 PM
Subject: Removing blank lines in text output
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx

Hello,

I have some XML I am transforming into text reports using Xalan. Given
the following XML:

       <ORU_R01.ORDER_OBSERVATION>
           <ORU_R01.OBSERVATION>
               <OBX>
                   <OBX.1>1</OBX.1>
                   <OBX.2>TX</OBX.2>
               </OBX>
           </ORU_R01.OBSERVATION>
           <ORU_R01.OBSERVATION>
               <OBX>
                   <OBX.1>2</OBX.1>
                   <OBX.2>TX</OBX.2>
                   <OBX.5>REASON: *SCREENING FOR OSTEOPOROSIS</OBX.5>
               </OBX>
           </ORU_R01.OBSERVATION>
           <ORU_R01.OBSERVATION>
               <OBX>
                   <OBX.1>3</OBX.1>
                   < OBX.2>TX</OBX.2>
               </OBX>
           </ORU_R01.OBSERVATION>
           <ORU_R01.OBSERVATION>
               <OBX>
                   <OBX.1>4</OBX.1>
                   <OBX.2>TX</OBX.2>
                   <OBX.5>ADDITIONAL CLINICAL DATA: BASELINE SCREENING.</OBX.5>
               </OBX>
           </ORU_R01.OBSERVATION>
           <ORU_R01.OBSERVATION>
               <OBX>
                   <OBX.1>5</OBX.1>
                   <OBX.2>TX</OBX.2>
                   <OBX.5>EXAM: OSTEO DEXA-TORSO  03/04/2007</OBX.5>
               </OBX>
           </ORU_R01.OBSERVATION>
           <ORU_R01.OBSERVATION>
               <OBX>
                   <OBX.1>6</OBX.1>
                   < OBX.2>TX</OBX.2>
               </OBX>
           </ORU_R01.OBSERVATION>
           <ORU_R01.OBSERVATION>
                <OBX>
                    <OBX.1>7</OBX.1>
                    <OBX.2>TX</OBX.2>
                </OBX>
            </ORU_R01.OBSERVATION>
        </ORU_R01.ORDER_OBSERVATION>

The actual text lines of the report are in the OBX.5 nodes... the line
numbers are in OBX.1. What I want to do is remove any trailing blank
lines, while leaving blank lines in the midst of the report. So in the
above example, I would write out lines 1 through 5 (including blank
lines 1 and 3), but not output lines 6 and 7. (Of course, the number
of lines is not constant, so I can't simply eliminate by line number.)
Is this possible in XSLT?

Thanks,

Greg Groves

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.