RE: [xsl] XSL Error

Subject: RE: [xsl] XSL Error
From: "Jack Cane" <jwcane@xxxxxxxxxxx>
Date: Mon, 10 Mar 2003 19:11:57 -0500
I realize that about the css file. Thanks. Will also check the Pawson
reference.

jwc

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Martinez,
Brian
Sent: Monday, March 10, 2003 4:51 PM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: RE: [xsl] XSL Error


> From: Jack Cane [mailto:jwcane@xxxxxxxxxxx]
> Sent: Monday, March 10, 2003 1:47 PM
> Subject: RE: [xsl] XSL Error
>
> All of my elements have the apply-templates statement, as in
> the following:
>
> <xsl:template match="SubSection">
>   <xsl:apply-templates/>
> </xsl:template>
>
> I do not quite understand where the apply-templates statement
> should be
> placed.

You may not be specifying the correct context node in which your templates
will match other nodes to process.

In your example above, you use xsl:apply-templates without supplying a
context node, so the XSLT processor will select templates that match child
nodes of SubSection.

But in your original message you wrote <xsl:apply-templates
select="ssHdr"/>, so only templates which match ssHdr (plus any children you
specify) will be selected.  So if ChapHdg is a child of ssHdr, you would
change your matching template to:

<xsl:template match="ssHdr/ChapHdg">
  <!-- do stuff -->
</xsl:template>

This is pretty basic XSLT/XPath--I recommend checking out the FAQ
(http://www.dpawson.co.uk/xsl/sect2/applytemplates.html and
http://www.dpawson.co.uk/xsl/sect2/N7654.html).

> Also, please confirm that the .css reference is in the right
> place. I want
> my .css to apply to all pages (about 30) of this document.

Not an XSLT question, but its placement appears OK.  Be mindful that you're
directly trying to reference a document on your filesystem--which may not
work when viewed in a browser.

hth,
b.

| brian martinez                              brian.martinez@xxxxxxxx |
| lead gui programmer                                    303.708.7248 |
| trip network, inc.                                 fax 303.790.9350 |
| 6436 s. racine cir.                             englewood, co 80111 |
| http://www.cheaptickets.com/                   http://www.trip.com/ |

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread