Re: [xsl] Re: Is an XPath processor responsible for catching misspelled tag names when there is an associated Schema?

Subject: Re: [xsl] Re: Is an XPath processor responsible for catching misspelled tag names when there is an associated Schema?
From: Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx>
Date: Fri, 22 Feb 2008 09:07:59 +0000
>>>>> "Philip" == Philip Fearon <pgfearo@xxxxxxxxxxxxxx> writes:

    Philip> To me, this seems like a missed opportunity because it
    Philip> should be possible to detect a significant number of error
    Philip> types as the expression is being written. Also, the
    Philip> emphasis on detecting errors at 'runtime' in IDEs may
    Philip> encourage a development style that doesn't take full
    Philip> advantage of the declarative nature of XSLT and XPath.

I guess a tool could be written along the following lines:

Inputs:

1) An XSLT transformation that does not invoke fn:collection(),
   and only invokes fn:doc() or fn:document() with static URIs
   (i.e. URIs that can be made absolute at compile time).

2) The URI for the principle source document (if any)

3) A set of mappings of source-document URIs to schemas


Given these, and a schema-aware XSLT processor, it ought to be
possible to check all XPath are valid with respect to the schemas.
-- 
Colin Adams
Preston Lancashire

Current Thread