cancel
Showing results for 
Search instead for 
Did you mean: 

how can my customized schema inherit properties of file.xsd?

catherine_
Champ on-the-rise
Champ on-the-rise

I am using "Blob.Attach" of rest api to attach blob to the document but i get exception from the Nuxeo automation client as it search's for the property "file:content" , which actually comes from file.xsd schema whereas i am using newFile.xsd schema to create the document.

so how do i store the blob ? is it possible that my customized document type schema i.e newFile.xsd can inherit the properties of file.xsd?

1 REPLY 1

Wojciech_Sulejm
Star Contributor
Star Contributor

You can use the xs:include element to have multiple schemas (provided you use the same targetNamespace - otherwise you'd have to use import instead of include). Here is an example where the core-types.xsd schema is included inside Nuxeo's file.xsd schema:

<?xml version="1.0"?>
<xs:schema targetNamespace="http://www.nuxeo.org/ecm/schemas/file/"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:nxs="http://www.nuxeo.org/ecm/schemas/file/">

  <xs:include schemaLocation="core-types.xsd" />

  <xs:element name="filename" type="xs:string" />
  <xs:element name="content" type="nxs:content" />

</xs:schema>
Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.