General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion XML self closing element

  • Qing

    XML self closing element

    Participants 5
    Replies 6
    Last Activity 7 years, 6 months ago

    Hi all,
    I am confusing about an element like this: in xmetal authoring enterprise 7.0.
    It shows a unknown character in both tags on view and normal view.
    Sorry I don't know how to insert an image directly here, so I attach it.

    Thank you all in advance.

    Reply

    Derek Read

    Reply to: XML self closing element

    Can you explain what is confusing you?
    I don't see any characters aside from the text that is cut off at the top of your screen capture and the name of the element (Graphic).

    Reply

    gcrews

    Reply to: XML self closing element

    I think he is referring to the red “X” missing image character.

    Reply

    Qing

    Reply to: XML self closing element

    Sorry for lacking detailed information.
    I have my own schema file, and define an element, name br, and do some transformation to make it appears like
    in plain test view instead of
    ,but I am getting something like this(figure 1), then I go to the sample file: Journalist, when I removing its attributes fileref, then it appears like this(phigure 2).

    I am using xmetal authoring enterprise 7.0.

    Reply

    Derek Read

    Reply to: XML self closing element

    The settings in the CTM file that make an element appear like an image (which is why you are seeing the red X) are set in the section. If you are creating your customization using XMetaL Developer then you have set a “Treat As Image” setting for the element in question (which results in the same thing being entered into the CTM file, it is just called something different in the CTM editor). In your CTM file you must have configured these settings to display the element as an image. Compare your CTM file to the Journalist CTM file. In the Journalist demo you will see this:

     
     
       Graphic
       FileRef
       Depth
       Width
       Alt
     
     
       InlineGraphic
       FileRef
       Depth
       Width
       Alt
     
     

    If you want the element to display as an image, and have the image display you must configure the “Source-Attribute”. That tells XMetaL Author which attribute points to a file path. The XML source file must also have a valid path set as the value for that attribute. With these things in place XMetaL Author will automatically render any of the natively supported bitmap image types.

    If you do not want the element to display as an image then you will need to remove those CTM settings. In this case, if the element is defined as “empty” in the DTD or Schema then a blue diamond will be displayed (this gives you something to select when viewing the document in Normal view).

    Reply

    Qing

    Reply to: XML self closing element

    Thank you Derek for the detailed reply.
    What I am trying to do is not to display an element as an image, I just modify the sample to file to figure that how XMetal treats empty element.

    I new an element named br and set the corresponding css file to make it display:block. And in this way, attempt to produce a line break when the br element is inserted into a document.
    But, when the element shows like
    in tags-on view, the cursor will be put inside the element after the insert behavior, and content will be inserted directly if the cursor is not moved out which cannot be done in normal view. The content inside an element acting as a line break is of no use.

    Then, after some transformation, we finally make an empty element
    , XMetal shows a blue diamond in both tags-on view and normal view. which is a little weird.

    Does XMetal just does not support line break inside a paragraph or empty element? I mean XMetal Authoring Enterprise 7.0.

    Reply

    Derek Read

    Reply to: XML self closing element

    How is the element defined in the schema?

    Standard default behaviour after insertion of any element is usually to put focus on the “content” of the element. What “content” means depends on the type of element however.

    If it is defined as an empty element then the blue diamond will be displayed (in both Tags On and Normal view). That is by design and is automatic. After insertion of an empty element the focus is placed on the blue diamond (ie: “inside” or “on” the element). This allows the element to be removed and also allows attributes to be set.

    If it is defined to allow children or text (PCDATA or CDATA) then just the tags will be displayed in Tags On view and you will see nothing in Normal view (except usually the text cursor). After insertion of such an element the focus is placed inside the element, allowing the user to insert a child element (if allowed) or type text (if allowed).

    If the resulting insertion is recognized as an HTML or CALS table (automatic based on definition in the schema) then the selection is usually placed inside the first cell of the table.
    If the resulting insertion is recognized as a list (CTM settings) then the selection is usually placed inside the first list item.

    Reply

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

Lost Your Password?

Products
Downloads
Support