This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: xsl <xsl:template match= question
- From: sara dot mitchell at ps dot ge dot com
- To: xsl-list at lists dot mulberrytech dot com
- Date: Fri, 14 Jun 2002 16:19:17 -0400
- Subject: RE: [xsl] xsl <xsl:template match= question
- Reply-to: xsl-list at lists dot mulberrytech dot com
The content within <title> is probably
getting output by the default templates which
are geared at outputing any text. You
can stop this by including a 'no-op'
template for title, like this:
<xsl:template match="title">
</xsl:template>
Sara
> -----Original Message-----
> From: dmitri kerievsky [mailto:dmitrik@mindspring.com]
> Sent: Friday, June 14, 2002 12:05 PM
> To: xsl-list@lists.mulberrytech.com
> Subject: RE: [xsl] xsl <xsl:template match= question
>
>
> Thanks for responding. The code using
> match="catalog/artist/album/label/person"
> does work, except it seems to include the value within title.
> Is there a way
> to avoid this?
>
> Dmitri
>
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of
> sara.mitchell@ps.ge.com
> Sent: Friday, June 14, 2002 1:14 PM
> To: xsl-list@lists.mulberrytech.com
> Subject: RE: [xsl] xsl <xsl:template match= question
>
>
> At the very least, the path in the match="" portion of
> the template does not match the actual path you have
> shown in your example. What you appear to be missing
> is the the "/" in the path means go down to children --
> it doesn't have to sort through siblings. So:
>
> * match="catalog/artist/name/album/title/label"
> is looking for the label element in a structure
> like this
>
> <catalog>
> <artist>
> <name>
> <album>
> <title>
> <label></label>
> </title>
> </album>
> </name>
> </artist>
> </catalog>
>
> It looks like what you really want is the attributes
> on the person element. The path to person based on your
> example is:
>
> match="catalog/artist/album/label/person"
>
> If you use this, the code to create the Mailto should
> work.
>
> Sara
> > -----Original Message-----
> > From: dmitri kerievsky [mailto:dmitrik@mindspring.com]
> > Sent: Friday, June 14, 2002 7:16 AM
> > To: xsl-list@lists.mulberrytech.com
> > Subject: [xsl] xsl <xsl:template match= question
> >
> >
> > this is outputting AB, instead of
> > href="mailto:joe@here.net">joe doe</a>
> > how can this line <xsl:template
> > match="catalog/artist/name/title/album/label/">
> > in the .xsl be changed to do this, without assigning an attribute?
> > thx,
> > dk
> >
> > .xml
> >
> > <catalog>
> > <artist>
> > <name></name>
> > <album>
> > <title>AB</title>
> > <label>
> > <person email="joe@here.net"
> > name="joe doe"/>
> > </label>
> > </album>
> >
> > </artist>
> > </catalog>
> >
> >
> > .xsl
> >
> > <xsl:template match="catalog/artist/name/title/album/label/">
> > <a href="{concat('mailto:', @email)}"><xsl:value-of
> > select="@name"
> > /></a>
> > </xsl:template>
> >
> >
> >
> > XSL-List info and archive:
http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list