[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XPath 1.5? (was RE: typing and markup)
The answers to these questions completely depend on what you are trying to do. For example, 1) A schematron schema might be used to apply _additional_ constraints on top of an XSD schema, i.e. to express constraints not expressible in XSDL (this is a great use for Schematron imho). In such cases I presume that we are dealing with instances that _actually are_ schema valid. 2) Of course if an instance is not schema valid, making the assumption that the schema constraints are met e.g. that the type "aaa/bbb" has a null instance set, would be incorrect -- that is the whole point of _not being_ schema valid, that the constraints expressed in the schema are not met. Shrug. If we are talking about using Schematron for XML documents that aren't valid w.r.t a particular schema, then certainly we would not want to import the schema into the Schematron "compilation" (if that makes sense). My point is that considering schema constraints as defining a set of nodes (an empty set if the constraint is that the XPath not exist) _is actually what the XSLT/XPath model does_ and this is actually how Schematron itself works, i.e. when Schematron "assert"s an XPath, it asserts that the instance set defined by the XPath is "not null". This is exactly why I say that XPath 1.0 defines a "type" system in which a type is a set of nodes, such type or more properly class heirarchies are exactly how OWL (the language formerly known as DAML+OIL) treats classes.*** Jonathan *** the reason I quote "type" and prefer "class" is that in set theory a type has a different meaning than "class" whereas in programming, type and class have essentially the same meaning, albeit they are used in slightly different ways (e.g. Java, the relationship between "int" and "class Integer") -- Jonathan > > > A Schematron assertion (that the node list is non-null) would then always > > fail, even at "compile" time. > > > > I think this behavior would be _better_ for Schematron. > > How can that be better for schematron? It completely breaks the whole > purpose of the schematron schema, which is to find the "bad" markup and > to report the occurrences to the user. Having your schematron schema > fail to compile because it is looking for illegal cases means that > almost all schematron schema would not compile. > > David > > _____________________________________________________________________ > This message has been checked for all known viruses by Star Internet > delivered through the MessageLabs Virus Scanning Service. For further > information visit http://www.star.net.uk/stats.asp or alternatively call > Star Internet for details on the Virus Scanning Service.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|