编号跨越不同的元素 [英] numbering across different elements
问题描述
假设我有:
< a>
< b i =" Y" j =" aaaa" />
< c i =" N" j =" bbbb" />
< d i =" Y" j =" cccc" />
< e i =" N" j =" dddd" />
< f i =" N" j =" eeee" />
< g i =" Y" j =" ffff" />
< / a>
我想提取i =" Y"的元素。这样我得到的东西就像
< x>
< y> 1。 aaaa< / y>
< y> 2。 cccc< / y>
< y> 3。 gggg< / y>
< / x>
如何让编号在不同的元素上工作?
>
谢谢,
迈克
suppose i have:
<a>
<b i="Y" j="aaaa"/>
<c i="N" j="bbbb"/>
<d i="Y" j="cccc"/>
<e i="N" j="dddd"/>
<f i="N" j="eeee"/>
<g i="Y" j="ffff"/>
</a>
and i want to extract the elements where i="Y" such that i get something like
<x>
<y>1. aaaa</y>
<y>2. cccc</y>
<y>3. gggg</y>
</x>
how would i get the numbering to work across the different elements?
thanks,
mike
推荐答案
文章< 72 ******** ******************@posting.google.com>,
Mike Dickens< mi ** @ progress-partnership.co.uk> ;写道:
In article <72**************************@posting.google.com >,
Mike Dickens <mi**@progress-partnership.co.uk> wrote:
我想提取i =Y的元素。这样我得到的东西就像
< x>
< y> 1。 aaaa< / y>
< y> 2。 cccc< / y>
< y> 3。 gggg< / y>
< / x>
如何让编号在不同的元素上工作?
and i want to extract the elements where i="Y" such that i get something like
<x>
<y>1. aaaa</y>
<y>2. cccc</y>
<y>3. gggg</y>
</x>
how would i get the numbering to work across the different elements?
将xsl:number与count一起使用属性指定
的计数。
- Richard
Use xsl:number with the "count" attribute to specify which elements
are counted.
-- Richard
2004年10月27日09:06:13 -0700, mi**@progress-partnership.co.uk (Mike Dickens)>
写道:
On 27 Oct 2004 09:06:13 -0700, mi**@progress-partnership.co.uk (Mike Dickens)
wrote:
假设我有:
< a>
< bi =" ; Y" j =" aaaa" />
< c i =" N" j =" bbbb" />
< d i =" Y" j =" cccc" />
< e i =" N" j =" dddd" />
< f i =" N" j =" eeee">
< g i =" Y" j =" ffff" />
< / a>
我希望提取i =Y的元素。这样我得到的东西就像
< x>
< y> 1。 aaaa< / y>
< y> 2。 cccc< / y>
< y> 3。 gggg< / y>
< / x>
如何让编号在不同的元素上工作?
谢谢,
迈克
suppose i have:
<a>
<b i="Y" j="aaaa"/>
<c i="N" j="bbbb"/>
<d i="Y" j="cccc"/>
<e i="N" j="dddd"/>
<f i="N" j="eeee"/>
<g i="Y" j="ffff"/>
</a>
and i want to extract the elements where i="Y" such that i get something like
<x>
<y>1. aaaa</y>
<y>2. cccc</y>
<y>3. gggg</y>
</x>
how would i get the numbering to work across the different elements?
thanks,
mike
mmmm ..您只想枚举所有元素?
您可以使用哪种技术?
在XQuery中,使用books.xml,
此查询:
for
mmmm.. you just want to enumerate all of your elements?
What technology is at your disposal?
In XQuery, using books.xml,
this query:
for
t at
这篇关于编号跨越不同的元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!