This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Problems with XSL, XML code


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]