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

Re: nesting xml

Subject: Re: nesting xml
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Thu, 03 May 2001 17:36:01 +0100
xsl nesting examples
Hi Tom,

Ah, well, in Mark's example, a template matching "text" would and should pick up everything, regardless of whether any explicit templates were given for the root (/) or document element (ROOT) ... since the built-in templates take care of them.

I was hearing you to say he'd have trouble if he didn't match them, which I guess isn't what you meant. In fact, if he did explicitly give templates for / or ROOT, they'd better say just what the defaults do, or his output won't come the way he expects. (Narrow bandwidth in here ain't it?)

Cheers,
Wendell

Mark's given source example:
<?xml version="1.0"?>
<ROOT>
 <text>
  <definition>
   <color>
    content
   </color>
   <size>
    content
   </size>
   <font>
    content
   </font>
  </definition>
  <data>
   content
  </data>
 </text>
</ROOT>

At 10:15 PM 5/3/01, you wrote:
Yes, Wendell, I know, but then your output will be unrelated to your
template (which may not ever get called, depending), so you get some kind of
output but not what you thought you were designing.

One example was Larry Mason's post from a little earlier.  When you run it,
you get the same output no matter what's in the template (I tried it to be
sure).

Cheers,

Tom P

[Wendell Piez]

> Tom--
>
> Not so. There is a built-in template
>
> <xsl:template match="/">
>    <xsl:apply-templates/>
> </xsl:template>
>
> which will pick up the root unless some other template beats it
> in  precedence/priority (not hard to do).

====================================================================== 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.