I have a project into which an xsd document is loaded, and based on this, an editor is created for each element. Then, the xml that implements this scheme is loaded into the editor. This can be a simple text field for a string, a date picker for a date, or more complex data, such as a chapter with relevant metadata.
The editor is general, therefore the editor is created on the basis of the scheme. For simple types (like strings and dates), we can use the type attribute. But for more complex custom types, we need to add an attribute to the xsd document, which determines which editor sub-element to use.
So, I added a custom UIType attribute, but this is not allowed by the w3 schema scheme. Is there any way to expand the w3 circuit diagram without first creating it and adding what I need, but actually expand it? Or is there another smarter way to do this?
Thanks.
Just to figure it out; I do not want to add the attribute to the actual xml data, but to the schema.
Here is an example circuit:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified"> <xs:element name="PublishDate" type="xs:date" /> <xs:element name="Chapters"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" name="Chapter" UIType="ChapterPicker" > <xs:complexType> <xs:sequence> <xs:element name="ID" type="xs:int" /> <xs:element name="FileID" type="xs:int" /> <xs:element name="Title" type="xs:string" /> <xs:element name="Artist" type="xs:string" /> <xs:element name="Year" type="xs:int" /> <xs:element name="Timestamp" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
source share