• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Generic schema from xml problem.

#1 2009-02-05 18:37:05

StijnM
Guest

Generic schema from xml problem.

Hi,

I am using TOS 3.0.2.r20205 and jre1.6.0_06 on Win XP in java mode.

In the Design Workspace I try to make a Generic Schema -> 'Create generic schema from xml'.

Short story:
A default XML Schema (talend_metadata_columns_schema.xsd) is being used to validate all XML files.


Long story:
I have a very simple XML instance document which I want to use as basis for the TOS Schema. The error I get is [...]SAXParseException: cvc-elt.1: Cannot find the declaration of element[...]

I went digging around a little

This is the call being made in the class ImportSchemaFileWizard (line 157):
metadataColumnsAndDbmsId = MetadataSchema.loadMetadataColumnsAndDbmsIdFromFile(file);
http://talendforge.org/trac/tos/browser/trunk/org.talend.repository/src/main/java/org/talend/repository/ui/wizards/metadata/connection/genericshema/ImportSchemaFileWizard.java

This points to some code which parses the physical file (line 289).
http://talendforge.org/trac/tos/browser/trunk/org.talend.core/src/main/java/org/talend/core/model/metadata/MetadataSchema.java

This is where the problem is (line 269-270):
fabrique.setAttribute(SCHEMA_VALIDATOR, schema);
fabrique.setValidating(true);

The XML Schema file being used is talend_metadata_columns_schema.xsd
http://talendforge.org/trac/tos/browser/trunk/org.talend.core/talend_metadata_columns_schema.xsd

Obviously, my own XML instance file is of my own making and I conform to my own XML Schemas. So, validating it against the default schema will never work.


Hopefully my analysis is correct, please confirm.

Stijn.

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Generic schema from xml problem.

Board footer

Powered by FluxBB