I have an XML document with language specific elements, example:
<root lang="en fr">
<section>
<title lang="en">English Title</title>
<title lang="fr">French Title</title>
<sequence>2</sequence>
<field>
<type>date</type>
<label lang="en">English field label</label>
<label lang="fr">French field label</label>
</field>
</section>
<section>
<title lang="en">Another English Title</title>
<title lang="fr">Another French Title</title>
<sequence>1</sequence>
</section>
</root>
At the top, the root element is intended to declare the document defines both english and french information.
There are certain elements in the document that need to be provided in english and french, such as title
and label
, since the root element declares support for both.
Is it possible to to express such a constraint in XML Schema? I could express the root
element language attribute differently, such as lang-en="1" lang-fr="1"
if that helps.