This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
If so, is there a way to insure that the 'legend' or text names, ie '01 submitting.....' are always attached with the XML file, in order to pass the Schema validation process?
My motivation is to reduce space requirements and from what i can tell, the data will always be processed by a computer and rarely manually, so what other reason would there be keep the 'text' tag associations?
If I remember correctly, an element name in XML documents must begin with a letter or underscore, not a digit. Otherwise your approach should work -- although debugging might not be quite as easy as with semantically meaningful element names.
Originally posted by bob connolly: If so, is there a way to insure that the 'legend' or text names, ie '01 submitting.....' are always attached with the XML file, in order to pass the Schema validation process?
Oops. I'm afraid this might be a little too much for XML Schema validation. You might need to implement "manual" validation in Java for this kind of a rule. I might be wrong, of course.
Joined: Mar 10, 2004
I quess what would be needed then, is a Schema methodology that would ENFORCE the relationship between the 'alpha numeric tag' and the 'verbose definition' of that tag! And hopefully, this would insure that the 'validation' could only occur if these relationships were hard coded in the Schema itself? In other words, when validating the XML data, the Schema would have to know that the tag is an 'alias' tag and therefore, require that that alias be 'detail or futher' defined in the Schema before the 'validation' could occur?
Does this sound like a feasible approach?, so in the debugging process, one could always consult the Schema for the meaing of the 'alias' tag?
So in other words, the 'verbose' tag is mainly for the benefit of the programmer in the debugging process then?