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

Re: XPath 2.0 Best Practice: wrap the first node of ev

Subject: Re: XPath 2.0 Best Practice: wrap the first node of every path expression within schema-element?
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Wed, 26 Mar 2008 10:35:08 +0100 (CET)
Re:  XPath 2.0 Best Practice: wrap the first node of ev
Martin Honnen wrote:

  Hi

>    <xsl:template match="/schema-element(Book)">
>      <xsl:text>matching on schema type: </xsl:text>
>      <xsl:value-of select="(Author/LastName, Author/Foo,
> Author/LastNam, 
> Author/Firstname)"/>
>    </xsl:template>

> [...]

> so it applies the template matching on schema-element(Book)
> but it does not give any warnings on Author/Foo, Author/LastNam,
> Author/Firstname.

  The mispellings are not on direct childs of the element you used
schema-element on.  Maybe they only implemented simpler checks: only on
direct childs, and maybe only when schema-element appears within the
XPath expression itself.

  If I remember correctly, Altova doesn't respond to questions if you
didn't get a support contract (they won't even listen to your
comments.)  So we can only guess here, and say that if the following
XPath expression doesn't emit any warning, then this processor most
probably doesn't implement any static type analysis:

    <xsl:template match="/">
       <xsl:value-of select="schema-element(Book)/Foo"/>
    </xsl:template>

  Regards,

--drkm























      _____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. Capaciti de stockage illimitie pour vos emails. http://mail.yahoo.fr

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.