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

Re: Schemaless XML?

  • From: Stephen D Green <stephengreenubl@gmail.com>
  • To: "Costello, Roger L." <costello@mitre.org>
  • Date: Wed, 12 Oct 2016 14:20:58 +0100

Re:  Schemaless XML?
A key difference in handling schemaless XML and XML with a schema to which it should adhere is when constructing an XPath expression, knowing whether to say /x/y[1]  or just /x/y   
If there is a schema it will likely say whether or not  y is limited to a single occurrence. 
If so then /x/y will always return a single node rather than nodeset. 
If not then you need /x/y[1]  (or better) to ensure it does. 
Getting back a nodeset when you expect a node could break downstream code.
True?
It is likely the schema could change without your knowing it to loosen the cardinality by allowing multiple elements where before only single occurrences were allowed. 
So the issue remains even with a schema of sorts.
I reckon if you are monitoring XML being passed around a network or the Internet you might be concerned to have a schema, else you would have to always cater for every element having multiple cardinality. 
Painful. Yet the schema could change at any time without a change of namespace so you are still kept on your toes.
I think agile methods have led to these things 
being only very rarely discussed and little advice
provided to developers.


--
----
Stephen D Green


  • References:

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.