cancel
Showing results for 
Search instead for 
Did you mean: 

Importing XSD in web forms

unmeshjoshi
Champ in-the-making
Champ in-the-making
Hi,

We are trying to include a XSD file from the home directory to alfresco template. We have shared.xsd in alfresco home and we are importing it in other xsds for webforms.
If we import XSD as,

<xs:import schemaLocation="/shared.xsd" namespace="http://www.myhome.com'/>

Alfresco somehow replaces it as following.

<xs:import namespace="http://www.myhome.com" schemaLocation="http://user-name.company-home.www--sandbox.127-0-0-1.ip.alfrescodemo.net:8180/shared.xsd'/>

And we can not create the content, because it can not resolve elements in shared.xsd. Anyone knows how to import XSDs in webforms?

Thanks,
Unmesh
3 REPLIES 3

pyppe
Champ in-the-making
Champ in-the-making
The new (as of Alfresco v2.2SP3 / v3.0SP1) recommended way of achieving this is through webscripts. For more information see http://wiki.alfresco.com/wiki/Forms_Authoring_Guide#Using_dynamic_types_in_schemas and example attachments in https://issues.alfresco.com/jira/browse/ETWOTWO-926.

kmehta31
Champ in-the-making
Champ in-the-making
Hi,

You can try uploading xsd into web project and use the relative path in your imports. Basically this approach works with all versions of Alfresco.
However I have faced difficulty in some version (3.0) while trying to include/import xsd from DM Space.

And as mentioned above the third way is to write the webscript to import. But i guess if web forms are not shared accross the projects then importing in the web project would be easier…

pmonks
Star Contributor
Star Contributor
You might find the solution described at http://blogs.alfresco.com/wp/pmonks/2009/07/07/including-a-static-xsd-in-a-web-form/ helpful.

Cheers,
Peter