General XMetaL Discussion
Qing December 2, 2013 at 2:02 am
XML self closing elementDecember 2, 2013 at 2:02 amParticipants 5Replies 6Last Activity 9 years, 2 months ago
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.Derek Read December 2, 2013 at 6:30 pm
Reply to: XML self closing elementDecember 2, 2013 at 6:30 pm
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).gcrews December 2, 2013 at 10:20 pm
Reply to: XML self closing elementDecember 2, 2013 at 10:20 pm
I think he is referring to the red “X” missing image character.Qing December 3, 2013 at 2:45 am
Reply to: XML self closing elementDecember 3, 2013 at 2:45 am
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.Derek Read December 3, 2013 at 9:51 pm
Reply to: XML self closing elementDecember 3, 2013 at 9:51 pm
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:
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).Qing December 4, 2013 at 9:02 am
Reply to: XML self closing elementDecember 4, 2013 at 9:02 am
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.Derek Read December 4, 2013 at 8:22 pm
Reply to: XML self closing elementDecember 4, 2013 at 8:22 pm
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.
- You must be logged in to reply to this topic.