Hi, I’m running Tamino V3.1.1.1 and I tried to define a simple schema with the new schema editor. The loaded DTD is well-formed, valid and looks pretty simple. Schema definition worked fine in Tamino 2.3.1.4 but in V3.1.1 I get the following error which seems to be the same one that rene foehn had.
The error message is: “validation has detected an error in document; datatype validation for attribute “name” of type xs:NCName failed: An invalid value has been found during validation. ”
The reason for the error is that the generated schema will contain element with namespace prefixes such as: <xs:element name=“meta:event”…
and this isn’t allowed in the XSD specification. What needs to happen here is to model all the DTD elements and attributes without the meta: prefix and ensure Tamino will validate the document with the correct namespace (i.e. “http://www.MobileLogic.com/meta”), so that an instance such as
Thanks Stuart - I’ve done something horrible to my system and I can’t run the Schema Editor any more. What you do though, is as you said edit the DTD 1)remove the declaration of the attribute xmls:meta
2) remove “meta:” everywhere
3)Convert it to a Tamino Schema. 4)Now the bit I can’t check with the Schema Editor -you have to change the schema to specify to use the prefix meta: and the namespace http://www.in4motion.com/meta. I just can’t remember how to do that with the Schema tool but if you can’t work it out it is pretty easy to do with an normal editor
Thanks for that! I’ve already been down that road but then have troubles storing a document that conforms to the schema, and to be honest I’m not sure if I am doing something or Tamino is not processing the instance correctly. So below is the TSD3 schema that I created and an instance document. Can you see whats wrong? When I store the document I get a error complaining about the event-id attribute not being found [ in the schema ].
If the attributes are to be named as meta:whatever then you have to set the attributeFormDefault to be “qualified”. This is because they are declared locally in the schema (within their elements) The cahnge is like this like this <xs:schema xmlns:xs = “XML Schema” xmlns:tsd = “http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition” targetNamespace = “in4motion.com” xmlns:meta = “in4motion.com” attributeFormDefault=“qualified”>
You can do this with the schema editor logical properties. - the default is “unqualified”
However I am getting a content error with your instance - maybe I’m too dumb to spot it.
quote:Originally posted by Nigel Hutchison: Thanks Stuart :-) - I've done something horrible to my system and I can't run the Schema Editor any more. What you do though, is as you said edit the DTD 1)remove the declaration of the attribute xmls:meta
2) remove "meta:" everywhere
Do only remove "meta:" in the name="meta:...". Do not remove anything in ref="meta:..."! If you remove "meta:" for an attribute (or an local element, which is currently never generated by the DTDtoTSD3 converter) you must as you said in an additional mail add form="qualified". Unfortenately there is an instance validation bug for this in the V3.1 version. Fix is currently only realised for York.
Best regards Walter
3)Convert it to a Tamino Schema. 4)Now the bit I can't check with the Schema Editor -you have to change the schema to specify to use the prefix meta: and the namespace http://www.in4motion.com/meta. I just can't remember how to do that with the Schema tool but if you can't work it out it is pretty easy to do with an normal editor
The magic is physically 1) change the xs:schema element start tag to look like this from
Walter explained how to do “physically magic”. This would have to be done in the schema source. But you can do the same thing with the Schema Editor by setting the schema nodes “targetNamespace” property to “in4motion.com” and by setting the “targetNamespace prefix” property to “meta”.