On Sun, May 4, 2008 at 4:56 AM, Andrew Welch
<andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com> wrote:
On 5/4/08, Dimitre Novatchev <dnovatchev(_at_)gmail(_dot_)com> wrote:
> Just read the relevant W3 Specs and any good XSLT book.
You could reply with that to any question...
Yes, and especially in this case this kind of reply is, I believe, the
most necessary for the group of very basic, core questions about XSLT.
The xs namespace is a bit of a pain in XSLT 2.0 - you nearly always
want to use it, so you have to define it and then exclude it... it's
pretty much boilerplate code for a new transform.
In XQuery it's inbuilt - you can use it without defining it.
This is why we have programming environments. I know at least two of
them (XSelerator and Visual Studio 2008/2005), which allow the XSLT
programmer to define skeletal code (a "snippet") to be displayed on
initial creation of an XSLT file.
I am using one of these programming environments on a daily basis.
Whenever I am creating a new XSLT 2.0 file with it, it automatically
displays the following starting code:
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:f="http://fxsl.sf.net/"
exclude-result-prefixes="f xs"
<xsl:template match="/">
</xsl:template>
</xsl:stylesheet>
and I do not have any problems with the prefixes ( either defining or
pruning them) I use most frequently.
I have another new-template that automatically creates the identity
rule for me, ..., and the possibilities for personalization are
virtually unlimited.
Certainly, such features are a must for any modern XSLT programming environment.
On the other hand, even using them does not mean the programmer should
not understand the auto-generated code (such as the
"exclude-result-prefixes" attribute) and this leads us at the point
where we started: training.
Let me congratulate Dr. Kay on the 4th edition of his "XSLT
Programmer's Reference" book. Although I have had for years his two
books on XSLT 2.0 and XPath 2.0, I am now ordering this new, 4th
edition.
--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--