How to write xsd schema that it would check if reference in xml to some element is valid?
Schema should mark error if "redbox" style would be absent in "styles". Code :
<styles>
<style name="www" color="#f0ff00" text-transform="uppercase"/>
<style name="redbox" background-color="#ff0000" border="1"/>
</styles>
Now I want make reference to use predefined attributes in my new element.
<div style="redbox" position="20 50 500 0" />
After 'decode' this div object would look like
<div background-color="#ff0000" border="1" position="20 50 500 0" />