I'm trying to make a simple xml-editor for some basic but specific needs, the thing that I'm not sure how to handle is that I want to be able to have own custom attributes (or something) in the xsd-schema itself.
Something like this is what I had in mind:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="Book">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Author" type="xsd:string" listable="1" />
<xsd:element name="Pages" type="xsd:int" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Where I want information about whether the element is 'listable' or not in the schema (note that the .xml file have no information or clue as to whether the element is listable or not, the listable attribute is just a way to organize the elements in the editor).
It doesn't need to be it's own attribute. If there's an misc attribute or something that I can play with that would be fine. Problem is just that the schema above doesn't validate (The 'listable' attribute is not supported in this context.)
Is there a way to store this kind of information in the schema?
Seems like it would be possible to create a new namespace but I don't know how that namespace should be declared so that any element may have a special attribute in the xsd (I'd rather avoid messing with the xml file for this). And it seems a bit overkill to create a new namespace just for this?
Or am I going about this the wrong way entirely?