Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-12-2009, 04:37 AM   PM User | #1
FuZion
Regular Coder

 
Join Date: May 2006
Posts: 152
Thanks: 5
Thanked 0 Times in 0 Posts
FuZion is an unknown quantity at this point
XML Invoices

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. What would my options be here? 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?

Thanks!

FuZion
FuZion is offline   Reply With Quote
Old 04-12-2009, 04:53 AM   PM User | #2
oesxyl
Master Coder


 
Join Date: Dec 2007
Posts: 6,682
Thanks: 436
Thanked 890 Times in 879 Posts
oesxyl is a jewel in the roughoesxyl is a jewel in the roughoesxyl is a jewel in the rough
Quote:
Originally Posted by FuZion View Post
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
oesxyl is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:10 AM.


Advertisement
Log in to turn off these ads.