Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Re: Output validation with XSLT 2.0

From: "Dimitre Novatchev" <dnovatchev@--------->
To:
Date: 5/4/2008 3:08:00 PM
On Sun, May 4, 2008 at 4:56 AM, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
> >  On 5/4/08, Dimitre Novatchev <dnovatchev@xxxxxxxxx> 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/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent