This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: XSLQUERRY
- From: "cutlass" <cutlass at secure0 dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 27 Feb 2002 12:45:53 -0000
- Subject: Re: [xsl] XSLQUERRY
- References: <20020227114641.15863.qmail@mailweb15.rediffmail.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
----- Original Message -----
From: "XSL Developer" <vsd18@rediffmail.com>
>
> dear xsl members,
> i have a problem. here it goes..
> xml structure:
>
> <root>
> <schedule category="title" type = "title2">
> title2
> </schedule>
> <schedule category="title" type = " title1">
> title1
> </schedule>
> <schedule category="title" type = "title3">
> episode
> </schedule>
> <schedule category="description" type="desc1">
> desc1
> </schedule>
> </root>
this should do the trick, though i havent tested.
xml file
----------------------------------------
<?xml version="1.0" ?>
<root>
<schedule category="title" type="title2">
title2
</schedule>
<schedule category="title" type="title1">
title1
</schedule>
<schedule category="title" type="title3">
episode
</schedule>
<schedule category="description" type="desc1">
desc1
</schedule>
</root>
xsl file
----------------------------------------
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="root">
<xsl:for-each select="schedule[@category='title' and @type='title1'] ">
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
> and i want to get the text where category = title and type =
> title1
btw, i would avoid stating something like XSLQuery, in a subject line, as it
could be misconstrued to be XMLQuery, a completely different thing
chow, jim fuller
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list