Quote:
Originally Posted by FuZion
This is a side thought on my other post regarding the invoicing system:
If I do write a program that saves invoices in XML format, I will need some sort of common structure to these invoices. Is there a way outside of my head that I can define this structure, say if a third party application was developed? I am aware of things like XSD, but only in terms of SOAP.
|
xsd is a general schema specification, soap use xsd but you can use any other format.
Quote:
|
What would my options be here?
|
xsd as you said but I recommand relaxng( compact). Read this:
http://relaxng.org/compact-tutorial-20030326.html
In my opinion relaxng is more flexible and easy to read/understand and once you have a schema you can convert it from one format to another using tools like trang.
http://relaxng.org/#conversion
the only limitation, for trang, is that you can't convert from xsd to other formats.
trang have the avantage that once you have build a xml file you can extract a schema from it.
Quote:
|
And another side thought: if my invoice format changed sometime down the road (and thus my XML format), how would I ensure that my program/XSD(or other format file) is compatible with both versions?
|
compare somehow schema for both version and if older schema is included in newer one there are compatible.
best regards