Florian Rosenberg wrote:
hi,

I have my compoent type implementation and provided an XSD to use XML
validation. Are there any specific steps I have to do. I'm currently using
the version 1.0 binaries and I don't really where to put  my XSD file.
I checked the code and found the tuscany-assembly-xsd project, where I
added my XSD to the tuscany-sca.xsd to check if it is working. All the
validation errors on the console go away, nevertheless it does not really
report an error if for example a mandatory attribute is missing in my XML
tags.

Could someone give us a brief description how the resolving works and how
to enable it if I work with the Tuscany binary distribution and do not want
to rebuild the tuscany-assembly-xsd to get it to work.

Thanks,
-Florian



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



The runtime currently loads:
tuscany-assembly-xsd/src/main/resources/tuscany-sca-include.xsd - defining the SCA namespace http://www.osoa.org/xmlns/sca/1.0 tuscany-assembly-xsd/src/main/resources/tuscany-sca.xsd - defining the Tuscany namespace http://tuscany.apache.org/xmlns/sca/1.0

If you want to add your extension schema to the http://tuscany.apache.org/xmlns/sca/1.0 namespace you need to include it in tuscany-sca.xsd, and rebuild that module. This is not dynamic, but it's intentional as we need to provide application developers with a single central XSD file completely defining that namespace anyway... as this is what most XML schema validation tools and editors out there expect.

If you want to define your extension schema in a different namespace, you can either:

- Try to add the following to your <composite> element:
<composite ...
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="yourNamespace locationOfyourXSDFile">
... not great but it should work.

- Or just package the XSD file defining that namespace in your extension JAR and I'll add a few lines of code to look for and automatically load extension XSDs in extension JARs. I will post again here when it's ready for you to try.

--
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to