Altova Mailing List Archives


RE: [xsl] XPath 2.0 Best Practice: wrap the first node of every path expression within schema-element?

From: "Costello, Roger L." <costello@--------->
To:
Date: 3/26/2008 11:36:00 AM
Is there anyone from Altova on this list?

To my mind, if the Altova XSLT/XPath processor doesn't raise an error
or a warning on:

    schema-element(Book)/Foo

then it is a pretty serious drawback of the Altova processor.

Certainly I will not recommend to my clients the use of any XSLT/XPath
processor which does not raise an error or warning on
schema-element(Book)/Foo

/Roger


-----Original Message-----
From: Florent Georges [mailto:lists@xxxxxxxxxxxx]
Sent: Wednesday, March 26, 2008 5:35 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] XPath 2.0 Best Practice: wrap the first node of
every path expression within schema-element?

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

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.