DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion Element not available in DITA specialization

  • larrygolding

    Element not available in DITA specialization

    Participants 4
    Replies 5
    Last Activity 11 years, 5 months ago

    Using XMetaL Author Enterprise

    I made a DITA specialization of the “content” topic type, and installed it according to the instructions in the presentation [url=http://www.slideshare.net/XMetaL/custom-xml-through-dita-specialization-in-xmetal]http://www.slideshare.net/XMetaL/custom-xml-through-dita-specialization-in-xmetal[/url]. After restarting XMetaL, I can create a blank XML document based on my specialized DTD, I can insert the root element pspconcept, and I can insert the child elements title, shortdesc, and pspconbody specified by pspconcept's content model. So far so good; in plain text view I have:

    <?xm-replace_text Type new title here ?>

    But when, in tags view, I place the cursor between the pspconbody start and end tags, the valid child element overview (the only valid child element in this preliminary version of my DTD) does not show up in the Element List pane (neither in the Used tab nor in the All tab); in fact, the Elements List pane is empty. Here is my module:

                        conref              CDATA              #IMPLIED
                        outputclass        CDATA              #IMPLIED
                        domains            CDATA            "&included-domains;">

                          "- topic/topic concept/concept pspconcept/pspconcept ">

                          "- topic/body concept/conbody pspconcept/pspconbody ">

                          "- topic/section concept/section pspconcept/overview ">

    What am I doing wrong?



    Derek Read

    Reply to: Element not available in DITA specialization

    Nothing obviously wrong looking at this. However, because there is no DTD file I'm not sure how it is referencing the other portions of the DITA DTDs and mods (can't see how that would affect things but you never know). Perhaps having both pspConcept.dtd and this file (the whole thing in case you have snipped it a little) will explain things better.

    The other thing I would recommend is to modify the DOCTYPE declaration to match this format so that XMetaL will take advantage of its catalog lookups to find everything:

    Note that the value for the PUBLIC id should match what you specified when you entered it into “Select Specialized DITA DTD” from the Tools menu. Doing this will also allow the DITA OT to find the proper DTD using its catalog (though that requires a separate manual catalog change on your part).



    Reply to: Element not available in DITA specialization

    Hi Derek, thanks for the response. The module file pspConcept.mod which I included in the original message is complete except for two comments at the top. The DTD file pspConcept.dtd is below.

    I have written an installer for my specialization that automatically makes the appropriate changes to dita_specialized.soc and dita_xac_catalog_specialized.xml. Is this the “manual catalog change” you refer to?

    With regard to your suggestion about the DOCTYPE: I have not yet created a template for my new content type. To test it, I do File, New, Blank XML Document, and select my pspConcept.dtd. In plain text view, the resulting blank document looks like this:

    Note that the name is “data-about”, despite the fact that dita_xac_catalog_specialized.xml contains this mapping:

          -//Microsoft//DTD MySecretProject PSP Concept//EN    pspConcept

    … and dita_specialized.soc contains this line:

    PUBLIC "-//Microsoft//DTD MySecretProject PSP Concept//EN" "C:Program Files (x86)XMetaL 6.0AuthorDITAXACspspConceptpspConcept_ditabase.dtd"

    Is that a clue?

    Here is the DTD:

    "-//OASIS//ENTITIES DITA Highlight Domain//EN"
    "....highlightDomain.ent"                                                >

              "-//OASIS//ELEMENTS DITA Topic//EN" "....dtdtopic.mod">

            "-//OASIS//ELEMENTS DITA Concept//EN" "....dtdconcept.mod">

            "-//Microsoft//ELEMENTS Quality Essentials PSP Concept//EN" "pspConcept.mod">

    "-//OASIS//ELEMENTS DITA Highlight Domain//EN"
    "....highlightDomain.mod"                                                >


    Derek Read

    Reply to: Element not available in DITA specialization

    Not sure why I missed it just looking (I had to create some files and play to jog my brain). You have defined so ultimately says it can have the element named “overview”. However, unless the element itself is defined XMetaL won't let you insert it, and you have not defined that element anywhere.

    Adding something like the following will allow you to insert it (not sure what you want to define its children as so I've just used PCDATA here to show that it works). You might want to use one of the standard DITA entities (for basic.ph or basic.block for example) instead.

    As for the DOCTYPE declaration, when you create a new document from that particular template XMetaL gives you what you see because it is sort of working in a dumb developer-oriented mode at that point. It has no idea what your final intensions are. Its sort of up to you to massage that into the final form you want to give to your real authors and then save the resulting file as a different template file (to save in the Template folder).

    I think if you fix the DTD then XMetaL may do a better job of automatically selecting in the Element List as the first element to insert (it basically tries to pick the first one declared in the DTD, it may be confused by what you have in there at the moment).

    The “manual change” I was referring to was to do with the DITA Open Toolkits catalog file located here:

    If you wish to use the DITA OT that we install to generate output using files based on your specialized DTD then you will need to add appropriate entries to this file so the DITA OT can find them. When you choose Tools > Select Specialized DITA DTD that wizard generates all the required files for authoring in XMetaL only, it does not try to mess with the DITA OT.



    Reply to: Element not available in DITA specialization

    Thank you Derek! Yes, that's it. I supplied the ELEMENT definitions for pspconcept and pspconbody, but not for overview. Embarassingly simple once you see it, but boy, it was hard to see 🙂

    Thanks again,



    Reply to: Element not available in DITA specialization

    hello every one

    i am working on Xmetal integrated with Teamcenter content management. Now i want to use and image imported in Teamcenter cms to Xmetal. this can be done by using inline-graphic element in Xmetal. But this element is not a default element.

    My question is how to add that element to Xmetal. I mean as we have some default element such as p,image etc.

    hope i am clear about this question. please help me in this issue

    thanks in advance


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

Lost Your Password?