ASP Error: 70
Description: Permission denied
Source: Microsoft VBScript runtime error

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

Re: Fwd: Parsing Excel - Selecting Ranges

Subject: Re: Fwd: Parsing Excel - Selecting Ranges
From: "Luciano Greiner" <luciano.greiner@xxxxxxxxx>
Date: Tue, 21 Oct 2008 19:26:32 -0300
Re:  Fwd: Parsing Excel - Selecting Ranges
Hi Florent.

 It works, but just when we have only one timesheet. The document may
have more timesheets like this:

>    georgfl@bxl-wrk-090> cat luciano.xml
>    <sheet>
>       <Row>
>          <Cell><Data>#</Data></Cell>
>       </Row>
>       <Row>
>          <Cell><Data>1</Data></Cell>
>       </Row>
>       <Row>
>          <Cell><Data>2</Data></Cell>
>       </Row>
>       <Row>
>          <Cell><Data/></Cell>
>       </Row>
>       <Row>
>          <Cell><Data>#</Data></Cell>
>       </Row>
>       <Row>
>          <Cell><Data>3</Data></Cell>
>       </Row>
>       <Row>
>          <Cell><Data>4</Data></Cell>
>       </Row>
>       <Row>
>          <Cell><Data/></Cell>
>       </Row>
>    </sheet>
>

I need to iterate over two groups (1,2) and (3,4).  Do you know how
may i do that?

Thank you

On Tue, Oct 21, 2008 at 9:33 AM, Florent Georges <lists@xxxxxxxxxxxx> wrote:
> Luciano Greiner wrote:
>
>  Hi
>
>> I need to select Row elements between Rows containing first
>> Cell/Data child filled with '#' and a clear first Cell/Data.
>
>  You can use the << and >> operators:
>
>    georgfl@bxl-wrk-090> cat luciano.xsl
>    <xsl:stylesheet
>          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>          version="2.0">
>
>       <xsl:output indent="yes"/>
>
>       <xsl:template match="/sheet">
>          <xsl:variable name="first" as="element(Row)" select="
>              Row[Cell/Data eq '#']"/>
>          <xsl:variable name="last" as="element(Row)" select="
>              Row[Cell/Data eq '']"/>
>          <xsl:sequence select="
>              Row[. >> $first][. &lt;&lt; $last]/Cell/Data"/>
>       </xsl:template>
>
>    </xsl:stylesheet>
>
>    georgfl@bxl-wrk-090> cat luciano.xml
>    <sheet>
>       <Row>
>          <Cell><Data>#</Data></Cell>
>       </Row>
>       <Row>
>          <Cell><Data>1</Data></Cell>
>       </Row>
>       <Row>
>          <Cell><Data>2</Data></Cell>
>       </Row>
>       <Row>
>          <Cell><Data/></Cell>
>       </Row>
>    </sheet>
>
>    georgfl@bxl-wrk-090> saxon -s:luciano.xml -xsl:luciano.xml
>    <?xml version="1.0" encoding="UTF-8"?>
>    <Data>1</Data>
>    <Data>2</Data>
>
>  Regards,
>
> --
> Florent Georges
> http://www.fgeorges.org/
>
>



-- 
Luciano Greiner

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.