X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.xml.sax%2Fsrc%2Forg%2Fsimantics%2Fxml%2Fsax%2FImporterGenerator.java;h=c312ab829d96afc952f6b5728cd5bc2494a2a510;hb=87051c110f9f44898d26f9a3d13374ca6b75b125;hp=cff87ed72fcfc43ef3b65ac1d5090eadf687c287;hpb=ada38ab0a1a98dcb413bef3273064da36ce2d273;p=simantics%2Finterop.git diff --git a/org.simantics.xml.sax/src/org/simantics/xml/sax/ImporterGenerator.java b/org.simantics.xml.sax/src/org/simantics/xml/sax/ImporterGenerator.java index cff87ed..c312ab8 100644 --- a/org.simantics.xml.sax/src/org/simantics/xml/sax/ImporterGenerator.java +++ b/org.simantics.xml.sax/src/org/simantics/xml/sax/ImporterGenerator.java @@ -525,7 +525,10 @@ public class ImporterGenerator extends SchemaConversionBase{ String binding = getBindingFromPrimitiveType(base); writeAttribute(fw, attrName, relationName, binding, isReference); } else { - throw new RuntimeException("Cannot resolve type for Attribute " + attrName + " -> " + primitiveType.getLocalPart()); + // TODO : using default String attribute should be configured with rules. + //throw new RuntimeException("Cannot resolve type for Attribute " + attrName + " -> " + primitiveType.getLocalPart()); + fw.writer.println(" //FIXME: Cannot resolve type for Attribute " + attrName + " Using default type String"); + writeAttribute(fw, attrName, relationName, "STRING", isReference); } } @@ -607,7 +610,8 @@ public class ImporterGenerator extends SchemaConversionBase{ // FIXME : handle optional attributes properly. for (org.simantics.xml.sax.configuration.Attribute a : composition.getAttribute()) { Attribute attribute = ((Attribute)attributes.getRight(a)); - QName atype = getBaseType(attribute); + //QName atype = getBaseType(attribute); + QName atype = getPrimitiveType(attribute); String defaultValue = attribute.getDefault(); if (defaultValue == null) defaultValue = getDefaultValue(atype);