By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,852 Members | 2,152 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,852 IT Pros & Developers. It's quick & easy.

XML Schema 'include' element

P: n/a
Hi,

I have now drafted a few small-scale schemas and have various types
being repeated. I have read that using the 'include' element will
allow me to write these once and then call them from the new schema
files and this works fine.

However, I was wondering if it is recommended for me to declare
elements in this 'common' schema as some of the elements are common
also? I ask this because I have read through some newgroups and they
have said that sharing elements like that is bad practice. The problem
is if I don't do this I will be declaring the same element everytime I
make a new schema and that surely is bad practice too.

Could anyone advise me what is seen as good practice?

Regards,
Jonathan Tremlett

Mar 17 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
j.tremlett writes:
However, I was wondering if it is recommended for me to declare
elements in this 'common' schema as some of the elements are common
also? I ask this because I have read through some newgroups and they
have said that sharing elements like that is bad practice. The problem
is if I don't do this I will be declaring the same element everytime I
make a new schema and that surely is bad practice too.


Writing things once and re-using them is sound software engineering
practice. Works for schemas too, IMHO.

ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Mar 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.