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

Re: Applying templates by selecting it

Subject: Re: Applying templates by selecting it
From: Sylvain Hellegouarch <sh@xxxxxxxxxx>
Date: Wed, 20 Jul 2005 17:54:56 +0200
Re:  Applying templates by selecting it
Great thanks :)

I'll read that carefully later on. XSLT is quite a big beast and sometimes you
forget the basics when doing more complex stuff.

In any case, it looks I still need some lessons on XSLT :)

Cheers again.
- Sylvain

Selon Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>:

> Dear Sylvain,
>
> At 11:16 AM 7/20/2005, you wrote:
> >Yeah cheers. In fact in my first sample version, I was using 'node' instead
> of
> >'a' for naming my template. But then I did realise that it would be more
> >confusing due to the very function you mentioned (node()).
>
> Ah, okay. (FWIW: node() is not a function, it's a node test. :-)
>
> >So in my email I changed the XML document from 'node' to 'a' but forgot to
> >change the template as well.
>
> Yet since the default builtin template for elements is
>
> <xsl:template match="*">
>    <xsl:apply-templates/>
> </xsl:template>
>
> and that for text nodes is (notice that *node test* in the pattern,
> "text()"):
>
> <xsl:template match="text()">
>    <xsl:value-of select="."/>
> </xsl:template>
>
> it turns out that, at least in your toy example, no extra template is
> needed for that "a" element (since it will descend to its text node child
> by default, which by default gets written out).
>
> >Anyway, lots of bandwith usage for nothing... my fault :)
>
> Oh I don't know -- sometimes these little conversations are useful, and you
> never know to whom. There are plenty of people lurking on the list
> especially in order to scoop up nuggets of insight found in such discussions.
>
> Cheers again,
> 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
> ======================================================================
>
>




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

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.