xsl-list
[Top] [All Lists]

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

2008-02-22 02:08:28
"Philip" == Philip Fearon <pgfearo(_at_)googlemail(_dot_)com> 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

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