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

Re: number + document

Subject: Re: number + document
From: abbouh <abbouh@xxxxxxxxxxxxxxxxx>
Date: Thu, 19 Jun 2003 09:25:30 +0000
doccontent
my input file is like:
...........
<dicodoc lang="FR">
....................

<doccontent>
.....................
<docbody>
......................
</docbody>
<chapmod docref="document1" lang="FR"/>
<chapmod docref="document2" lang="FR"/>
<chapmod docref="document3" lang="FR"/></doccontent>
</dicodoc>

and "document1.xml" is like:
.............................
<doccontent>
<docbody>
<chap1><ht>title1</ht>
.......................
</chap1>
</docbody>
</doccontent>



"document2.xml" is like:
.............................
<doccontent>
<docbody>
<chap1><ht>title2</ht>
.......................
<chap2><ht>paragraph1</ht>
<chap3><ht>ss-paragraph1</ht>
...............................
</chap3>
<chap3><ht>ss-paragraph2</ht>
................................
</chap3>
<chap3><ht>ss-paragraph3</ht>
..............................
</chap3>
................................
</chap2>
<chap2><ht>paragraph2</ht>
................................
</chap2>
</chap1>
</docbody>
</doccontent>




"document3.xml" is like:
.............................
<doccontent>
<docbody>
<chap1><ht>title3</ht>
.......................
</chap1>
</docbody>
</doccontent>


abbouh a écrit :

> i want to use nuber for each "ht" node in several document
> so i use this xsl file:
> <xsl:for-each select="//doccontent/chapmod">
> <xsl:for-each
> select="document(concat(string(./attribute::docref),'.xml'))//ht">
> <xsl:choose>
> ....
> <xsl:number level="multiple"  count="chap1|chap2|chap3" format="A.1"/>
> ..
> <xsl:value-of select="."/>
> ..
> </xsl:for-each>
> </xsl:for-each>
>
> and receive this output:
>
> A title1
> A title2
>     A.1 paragraph1
>       A.1.1 ss-paragraph1
>       A.1.2 ss-paragraph2
>       A.1.3 ss-paragraph3
>     A.2 paragraph2
> A title3
>
> but what i want to get is:
>
> A title1
> B title2
>     B.1 paragraph1
>       B.1.1 ss-paragraph1
>       B.1.2 ss-paragraph2
>       B.1.3 ss-paragraph3
>     B.2 paragraph2
> C title3
>
> any idea,
> thanks
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.