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

Re: Re: Output validation with XSLT 2.0

Subject: Re: Re: Output validation with XSLT 2.0
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Sat, 3 May 2008 22:06:31 -0700
Re:  Re: Output validation with XSLT 2.0
> Why does the processor generate the namespace declaration,
> xmlns:xs="http://www.w3.org/2001/XMLSchema" on the <result tag ?
>
> To avoid this I have to do, exclude-result-prefixes="xs" on the
> xsl:stylesheet element.

Just read the relevant W3 Specs and any good XSLT book.

I have emphasized the need for good training many times -- missing it
proves to be extremely costly: limiting, stopping, blocking.; or even
worse: confusing, deceiving, leading to out-of-context
self-appreciation.

Many thanks to such great teachers as Dr. Kay and G. Ken Holman. Their
books, training courses and advice have been extremely beneficial to
the majority of people on this list.



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




On Sat, May 3, 2008 at 8:36 AM, Mukul Gandhi <gandhi.mukul@xxxxxxxxx> wrote:
> If I modify the example (as given in my blog post) as follows (with
> rest of the things remaining same), which seems more logical to me:
>
>  <xsl:template match="/">
>    <xsl:variable name="temp1">
>      <x>
>        <y />
>      </x>
>    </xsl:variable>
>    <xsl:variable name="temp2">
>      <p>
>        <q />
>      </p>
>    </xsl:variable>
>    <result>
>      <xsl:copy-of select="$temp1" validation="strict" />
>      <xsl:copy-of select="$temp2" validation="strict" />
>    </result>
>  </xsl:template>
>
> Now I specify validation="strict" on xsl:copy-of instruction.
>
> The output produced is (with Saxon-SA 9):
>
> <?xml version="1.0" encoding="UTF-8"?>
> <result xmlns:xs="http://www.w3.org/2001/XMLSchema">
>   <x>
>      <y/>
>   </x>
>   <p>
>      <q/>
>   </p>
> </result>
>
> Why does the processor generate the namespace declaration,
> xmlns:xs="http://www.w3.org/2001/XMLSchema" on the <result tag ?
>
> To avoid this I have to do, exclude-result-prefixes="xs" on the
> xsl:stylesheet element.
>
>
> On 5/3/08, Mukul Gandhi <gandhi.mukul@xxxxxxxxx> wrote:
> > Hi all,
> >  I posted my thoughts about this topic on my blog
> > (http://mukulgandhi.blogspot.com/2008/05/output-validation-with-xslt-20.html).
> >
> > I would like to hear the list member's opinion about this example, and
> > to know the best practices to import schemas, use namespaces etc. for
> > this particular scenario.
>
>
> --
> Regards,
> Mukul Gandhi

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.