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

Re: [XSL] Two "Philisophical" questions about the lan

Subject: Re: [XSL] Two "Philisophical" questions about the language
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 17 Jan 2009 06:34:31 -0500
Re:  [XSL] Two "Philisophical" questions about the  lan
At 2009-01-17 12:23 +0100, Alain wrote:
First one
--------------
We've got an instruction :
<xsl:if>

But this instruction has no <xsl:else> as any other language I've used.

XSLT was designed for use with XSL-FO, and it is very often the case that you want to add something to the result tree or add nothing. XSL-FO has 270 differently-named attributes ... adding some on a condition is very common.


-----------------
My second one might be easier!

Let's say I have an XML like this

<?xml version="1.0">
<root>
 <!-- Any number of nodes here -->
</root>

As a valid XML document can have only one "main" node,

Called the "document element".


what is the architectural and practical difference between

<xsl:template select="/">

and

<xsl:template select="/root">

First, it would be match="/" and match="/root", and needing to match on the document node is important to access the XML prologue and any content after the document element in the instance:


<?xml version="1.0">
<?xml-stylesheet type="text/xsl" href="over-there.xsl">
<?owner jsmith>
<root>
</root>
<!--copyright notice here-->

The root node in the above document has 4 child nodes.

At the moment:
- they do the exact same thing

False.


I hope this helps.

. . . . . . . . . . Ken

--
Upcoming XSLT/XSL-FO, UBL and code list hands-on training classes:
:  Sydney, AU 2009-01/02; Brussels, BE 2009-03; Prague, CZ 2009-03
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

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.