xsl-list
[Top] [All Lists]

[xsl] XSLT filter syntax advice?

2009-11-25 23:04:46
Hey folks -

I'm trying to use XSLT to transform the following XML into HTML...

<Catalog>
    <Category>
    <Name>Category A</Name>
        <Item>
        <Id>Item 1a</Id>
        <Rank>1</Rank>
        <Title><![CDATA[The Title of Item 1a]]></Title>
        <Description><![CDATA[a great description of item 1a]]></Description>
        </Item>
        <Item>
        <Id>Item 2a</Id>
        <Rank>2</Rank>
        <Title><![CDATA[The Title of Item 2a]]></Title>
        <Description><![CDATA[a great description of item 2a]]></Description>
        </Item>
    </Category>
    <Category>
    <Name>Category B</Name>
        <Item>
        <Id>Item 1b</Id>
        <Rank>5</Rank>
        <Title><![CDATA[The Title of Item 1b]]></Title>
        <Description><![CDATA[a great description of item 1b]]></Description>
        </Item>
        <Item>
        <Id>Item 2b</Id>
        <Rank>10</Rank>
        <Title><![CDATA[The Title of Item 2b]]></Title>
        <Description><![CDATA[a great description of item 2b]]></Description>
        </Item>
    </Category>
</Catalog>

I'm getting hung up on the XSLT syntax that will display all the
"Items" for a particular Category. I can list the categories - or the
Items, but listing the items in a particular category is not working
so well.

I assume I need to pass the category as a parameter, but still not
getting it quite right.

Thanks!
Doug

--~------------------------------------------------------------------
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>