General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion XMAX doctype ignores namespace prefixes

  • ildark

    XMAX doctype ignores namespace prefixes

    Participants 3
    Replies 4
    Last Activity 12 years, 6 months ago

    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.

    Reply

    Derek Read

    Reply to: XMAX doctype ignores namespace prefixes

    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

    Reply

    Derek Read

    Reply to: XMAX doctype ignores namespace prefixes

    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

    (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.

    Reply

    ildark

    Reply to: XMAX doctype ignores namespace prefixes

    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.

    Reply

    Derek Read

    Reply to: XMAX doctype ignores namespace prefixes

    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.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support