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

RE: Static type-checker

Subject: RE: Static type-checker
From: drkm <darkman_spam@xxxxxxxx>
Date: Fri, 18 Nov 2005 15:25:59 +0100 (CET)
static checker
Michael Kay wrote:

> It's always a good idea to declare the types of
> your variables explicitly.

  I agree.  But my problem is a quite more complex.  I generate XSLT
from personal XML format (with XSLT, indeed).  The XML doc can use
XPath expressions in some contexts.  I generate some variables the XML
doc can use.

  The XML doc can create its own variables (almost shortcuts for
clarity of the document).  And I don't really like the idea of asking
users to declare the type of the variables they create (the view they
have of the big picture is really simplified).

  After having worked on a document, the user runs a transformation in
validation mode.  The goal is only to detect as more as possible typos
(and to discover new features of XPath/XSLT 2.0 from my point of view
:-p).

  Because it's in a testing phase, and that I know the used schemas and
the type of the initial variables, I could create an additional
transformation to infer myself the type of the user-created variables
(maybe in XSLT, but it's quite complex, IMHO).

> However, you can expect that Saxon will gradually
> get smarter in its checking in future releases.

  Great!

> the use of a path expression like
> $list/my:zorglub[1] is not an error

  Yes I know.  But in my case, we know exactly the type of the
manipulated elements, and we never have to wrote such an XPath
expression (that selects an unknow child of an element, knowing its
type).

  Thanks a lot for all these precisions,

--drkm



















	

	
		
___________________________________________________________________________ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Tilichargez cette version sur http://fr.messenger.yahoo.com

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.