xsl-list
[Top] [All Lists]

Re: xsl:key match all values

2005-03-28 12:02:26
Karl,

A key for this would be:

<xsl:key name="BBB-children-by-t" match="BBB/*" use="../@t"/>

or you could simply retrieve the BBB by its @t

<xsl:key name="BBB-by-t" match="BBB" use="@t"/>

and then traverse to children by saying key('BBB-by-t','1')/*.

I hope that helps,
Wendell

At 01:41 PM 3/28/2005, you wrote:
Hello,

How do you setup a key that simply matches all child elements from the
match?  Given:

<AAA>
     <BBB t="1">
          <CCC  s = "1"/>
          <CCC  s = "2"/>
          <CCC  s = "3"/>
          <CCC  s = "4"/>
          <CCC  s = "5"/>
          <CCC  s = "6"/>
     </BBB>
     <CCC>
          <BBB  r = "a"/>
          <BBB  r = "b"/>
          <BBB  r = "c"/>
     </CCC>
     <BBB/>
     <BBB/>
</AAA>


I just want to return all child elements of BBB t='1'.
So results would be:

          <CCC  s = "1"/>
          <CCC  s = "2"/>
          <CCC  s = "3"/>
          <CCC  s = "4"/>
          <CCC  s = "5"/>
          <CCC  s = "6"/>


Karl

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


======================================================================
Wendell Piez                            
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>