xsl-list
[Top] [All Lists]

RE: [xsl] XTTE0570 at compilation, depending on runtime conditions?

2007-11-04 15:16:55
Michael Kay wrote:

Basically the rule with type errors such as XTTE0570 is
that you are allowed to raise a type error at compile time
if there is an expression which, if executed, would always
fail. In this case there's an implicit
<xsl:otherwise><xsl:sequence select="()"/></xsl:otherwise>
which, if executed, would always fail.

  Yes.  But it would not be /always/ executed at runtime.
At first glance, I thought it would raise an error at
runtime iff the xsl:otherwise (either explicit or implicit)
is reached.

  So I guess to get this behaviour I should write instead:

    <xsl:otherwise>
       <xsl:sequence select="error(xs:QName('err:XTTE0570'))"/>
    </xsl:otherwise>

  It sounds a little bit strange to me at first, but I like
early reporting of (possible) error, mostly at compile time,
so I like it at the end of the day.

  Thank you for your response.

  Regards,

--drkm























      
_____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 


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

<Prev in Thread] Current Thread [Next in Thread>