[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XSL Error

Subject: RE: XSL Error
From: "Martinez, Brian" <brian.martinez@xxxxxxxx>
Date: Mon, 10 Mar 2003 14:51:18 -0700
xsl error
> From: Jack Cane [mailto:jwcane@xxxxxxxxxxx]
> Sent: Monday, March 10, 2003 1:47 PM
> Subject: RE:  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


Current Thread
  • XSL Error
    • Jack Cane - Mon, 10 Mar 2003 13:35:12 -0500 (EST)
      • Jack Cane - Mon, 10 Mar 2003 14:26:19 -0500 (EST)
      • Michael Kay - Mon, 10 Mar 2003 15:14:42 -0500 (EST)
        • Jack Cane - Mon, 10 Mar 2003 15:43:36 -0500 (EST)
      • <Possible follow-ups>
      • Martinez, Brian - Mon, 10 Mar 2003 16:49:21 -0500 (EST) <=
        • Jack Cane - Mon, 10 Mar 2003 19:08:33 -0500 (EST)

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.