how to implement custom schema ?
hi, i m practicing with nuxeo sdk and try to register a new schema like explained here http://doc.nuxeo.com/display/NXDOC/Document+types.
Unfortunatly, each time, i encounter the following error :
ERROR [org.nuxeo.ecm.core.schema.XSDLoader] FatalError: Premature end of file.
ERROR [org.nuxeo.ecm.core.schema.TypeService] org.xml.sax.SAXParseException: Premature end of file.
and the schema file became totaly empty.
Did i miss something ?
0 votes
1 answers
3455 views
You need to close the tag with the namespace prefix as well as schema as bjalon pointed out. For example
<?xml version="1.0"?>
<xs:schema targetNamespace="http://www.nuxeo.org/dam/schemas/dam/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:nxs="http://www.nuxeo.org/dam/schemas/dam/">
<xs:element name="client" type="xs:string" />
<xs:element name="brandMake" type="xs:string" />
<xs:element name="productModel" type="xs:string" />
</xs:schema>
thank you, so i just closed the schema like you did, double check the file…and still have the same error.
02/01/2012
Then your file is still not valid XML. We can't help you without seeing the exact file (use pastebin.com for instance to show it to us), and anyway you should be able check by yourself that the XML is valid or not, there are many many tools to do it.
02/01/2012
Finally, i should have checked the file one more time. it's working now with the closing </xs:schema>.
02/01/2012
Here's the last try :
– sample.xsd
–contrib.xml