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

RE: Problems with XSL, XML code

Subject: RE: Problems with XSL, XML code
From: "John E. Simpson" <simpson@xxxxxxxxxxx>
Date: Tue, 03 Oct 2000 15:24:46 -0400
john evan simpson
At 10:36 AM 10/03/2000 -0700, Evan Lenz wrote:
Good explanation, John. Maybe I could make just two corrections:

Thanks for those, Evan. (What are you, an editor or something?:) I was trying mainly to nudge the original poster in the right direction; he was too far away from solving the nuances.


1. Why the default namespace?  That's not necessary; literal result elements
don't have to be in a namespace.

Right. I think I said "you must" or "you need" [i.e., to include the default namespace declaration], which is putting it too strongly. For my own taste, I always prefer to include it. No loose ends. :)


2. If you remove HORA from the template rule's match pattern, the <HORA>
child will still be processed by <xsl:apply-templates/>, which processes
each child (elements, text, processing instructions, and comments) of the
current node.  In this case, the children consist only of elements (and
whitespace text nodes which don't cause any important difference as will
become clear).  If a template rule is not found that matches a given child,
then the built-in template rule for that node type is used.  In the case of
an element, the built-in rule is to simply apply templates to its children.
<HORA>'s child consists of a text node.  Since there are no explicit
template rules matching text nodes, the built-in rule for text nodes will be
applied, which is to copy the text to the result tree.  Thus, you would end
up copying "10:08", etc. to the result tree.

Right again. Thanks!


==========================================================
John E. Simpson | "Curiosity killed the cat,
http://www.flixml.org | but for a while I was a
XML Q&A: http://www.xml.com | suspect." (Steven Wright)



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.