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

Re: template matching everywhere

Subject: Re: template matching everywhere
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 05 Mar 2004 11:36:31 -0500
understand template matching
At 04:02 AM 3/5/2004, you wrote:
Thank you for your help,
As you've understand I'm a beginner. Sorry for this stupid question but I know I misunderstood something but I didn't know what it was. I think my understanding of <xsl:apply-templates/> was a little wrong (I still have something to clarify). Now it's better.

It's a common place to get stuck, and it's good you got stuck there when you're just starting, since it's also a really important concept and your XSLT will never be very good until you've gotten your head around it.


The key thing to understand is that classically, XSLT stylesheets do not control the flow of operations in the transformation. (I say classically since there are ways of forcing things, but generally this shouldn't be done unless you need to.) Instead, xsl:apply-templates passes control back to the source document, by saying "okay now process the next elements [which are generally the child elements of the node you're on] with whatever templates are defined for them". This is really powerful, because it means that documents can have structures of arbitrary complexity, and yet a simple stylesheet can handle them properly without accounting for that structure directly. Processing many kinds of XML, such as documentary data marked up with Docbook or TEI or the NCBI Journal DTD, is next to impossible without this kind of feature, since many documents will share the same tags (same element types) without resembling each other structurally at all.

I'm gonna dip again in a book looking at the right place !!

Cool.


Enjoy,
Wendell


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================


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



Current Thread

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.