Pages: 1
Print
Author Topic: XMAX doctype ignores namespace prefixes  (Read 1292 times)
ildark
Member

Posts: 2


« on: May 18, 2010, 06:48:28 AM »

I'm writing some kind of the Attributes Inspector for XMAX control (6.0) and got a problem with s1000d schemas (compiled into a xac). When I try to get a list of attibute names for an element (through Document.doctype.elementAttributes), it returns list of names without namespace prefixes. For example, 'graphic' element has attributes 'xlink:href' or 'xlink:title', but I got attributes 'href' and 'title' in the list. Also, the schema contains 'dc:title' element, but the method returns attributes for the 'title' element, also defined in the schema.
Validation of the document works well using prefixed attribute and element names.

What I'm doing wrong and is't some way or workaround to get full attribute names for an element?

Thanks.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 1551



WWW
« Reply #1 on: May 20, 2010, 05:30:26 PM »

For warnings against using the DOMDocumentType object with W3C Schemas please see the topic "DOMDocumentType" in the XMetaL Developer Programmer's Guide.

Also viewable here: http://na.justsystems.com/webhelp/en/xmetaldeveloper/pg/6.0/pg.html#DOMDocumentType
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 1551



WWW
« Reply #2 on: May 20, 2010, 05:58:37 PM »

You may wonder why we have not attempted to support what you are looking for. Essentially it comes down to the fact that the W3C has never clearly defined this. Please see the following:

DOM 1 (1998):  http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-412266927
DOM 2 (2000):  http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-412266927
DOM 3 (2004):  http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-412266927

Quote
(same for all links above)
The DocumentType interface in the DOM Core provides an interface to the list of entities that are defined for the document, and little else because the effect of namespaces and the various XML schema efforts on DTD representation are not clearly understood as of this writing.
Logged
ildark
Member

Posts: 2


« Reply #3 on: May 21, 2010, 04:59:57 AM »

OK, I see. But why you didn't implement it somewhere else? For example, the Selection interface has CanInsertList property to get a list of context-sensitive elements, but has no any CanInsertAttributeList analog. I guess, it's easy for you because you hold entire xml schema with namespaces internally.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 1551



WWW
« Reply #4 on: May 21, 2010, 01:46:31 PM »

Lack of client demand would be the main factor. Now that we have had a request for something along these lines we may consider adding to the list of APIs clients are looking for, or adding some other feature that helps in a similar way.
Logged
Pages: 1
Print
Jump to:  

email us