Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.
I am trying to do an insert of document into Tamino from a JDOM doc. It works fine when my doc is not in a namespace, but when it’s in a namespace, I get an “undeclared attribute” error – for the xmlns attribute.Thanks.Here is the error msg:Code:INOXDE7716MessageText:(cvc-assess-attr.1): undeclared attributeMessageLine:Line 1, Column 10: [attribute “xmlns” in element “WebIcon”]Here is my insert code: TAccessLocation coll = TAccessLocation.newInstance(collection); TXMLObjectAccessor accessor = _connection.newXMLObjectAccessor(coll, TJDOMObjectModel.getInstance()); TXMLObject insertObj = TXMLObject.newInstance(doc.getRootElement()); insertObj.setDoctype(docType); try { accessor.insert(insertObj); return OKAY; } catch (TInsertException te) {Here is the actual doc:<?xml version="1.0" encoding="UTF-8"?><WebIcon xmlns=“http://www.example.com/SimpleExampleSchema” IconName=“asdf”Creator=“tom”>asdfasdfHere is the schema:<?xml version="1.0"?><schema xmlns=“XML Schema” xmlns:ted=“TED Namespace” xmlns:se=“http://www.example.com/SimpleExampleSchema” targetNamespace=“http://www.example.com/SimpleExampleSchema” elementFormDefault=“qualified”>
Hello Phil,could you please try with the attached Tamino Schema?I loaded your XML schema into the Tamino Schema Editor and converted it to a Tamino schema (TSD4).The only change that I made by hand was to add a doctype “se:WebIcon”.I used se:WebIcon because the targetNamespace URI is the same as the se namespace URI.With this schema I was able to load your document, and retrieve it via a query on the doctype (/se:WebIcon).I hope that helps!Trevor. WebIcon.tsd (1.98 KB)