Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Who supports Schema validation of unique >Thread Next - Re: Who supports Schema validation of unique Re: Who supports Schema validation of uniqueTo: NULL Date: 4/8/2009 9:31:00 AM Chip Grandits wrote: > On Apr 7, 12:17 am, "P. Lepin" <p.le...@ctncorp.com> wrote: >> XML is case-sensitive. 'CustomerID' is not the same thing as >> 'customerID'. > > I ask the XML community out there, can anyone point out a resource > where I can find some example XML Schema code that does not contain errors. W3C's XML Schema Part 0: Primer SE is a decent reading, if a bit on the chewy side. > I downloaded an evaluation version of Altova XMLSpy, because I came to > the conclusion one has to pay money for a properly functioning XML validation tool. One properly functioning XML validation tool is called 'xmllint'. It's open-source and ubiquitous, since it's a part of libxml2. > Yet I can put anything in the xpath attribute for selector, hit the F8 > key, and and Altova gives me the green check mark saying everything is OK. > well I can't type in anything > <selector xpath="!@!@!"/> > causes a validation error, but > <selector xpath="obviouslyNonExistentXpathExpressionSubset"/> > is perfectly OK. You're talking nonsense. 'xpath' attribute on 'selector' element can be arbitrarily complex. So can be the rest of your schema. Checking whether your XPath expressions make sense in context of a given schema simply isn't a viable option. > Maybe I don't understand what validation means. I think you don't. 'Validation' means testing whether a certain XML document complies with an XML Schema (or DTD) you provide. Determining whether your schema makes sense at all is a task best left for humans, since there are some hard problems in the area of formally defining 'makes sense'. > I'm having a hard time learning XML, because I learn by example. ...which is not a valid learning methodology, unless accompanied by attempting to solve problems you come across. Reading solid introductory materials is a good idea, too. Otherwise you're bound to come back in a couple of weeks asking, 'Why the hell can't I express a certain class of constraints using XML schemata?' (The answer is, 'Because XML schemata are not designed for expressing arbitrary constraints: design from mock-up just doesn't work in this case.') > Is there a software tool that does the kind of validation I am looking > for? I believe the hourly rates on the 'software' tools you're looking for are normally well above $100/hour. Although you might be able to save some if you outsource to Asia or Eastern Europe. -- Waterfall: One Process To Rule Them All | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
