Home Forums DITA and XMetaL Discussion adding an non existing element to xmetal Reply To: adding an non existing element to xmetal

Derek Read

Reply to: adding an non existing element to xmetal

Your question is not very clear, but I can think of only two possibilities:

1. You wish to create a valid document that allows the new element. In this case your schema (DTD or W3C Schema) must be modified to allow the element. Once the schema is modified to allow the element XMetaL Author will display it when appropriate (when it is allowed to be inserted) in the Element List or allow you to paste it into a document. Your customization scripts can then also use APIs that check for validity and insert elements including the new element.

2. You wish to create an invalid document. You have two options here:
  a) Keep “Rules Checking” on (it is by default), switch to Plain Text view and modify the document as you like. The document will be invalid so if you wish to save the document you will need to answer “yes” when told that you will be saving an invalid document. You cannot add invalid elements in Tags On or Normal views when Rules Checking is on because that is specifically what Rules Checking prohibits (along with many other things that will create an invalid document). Depending on the complexity of the invalidity (this depends on the location of the invalid element and its children) you may not be able to switch back to Tags On or Normal view from Plain Text view in this case, or Rules Checking may be turned off if the switch is allowed.
  b) Turn “Rules Checking” off. Read about what this means here: http://forums.xmetal.com/index.php/topic,1122.0.html

Keep in mind that Teamcenter (and most other CMS systems) will not allow an invalid document to be checked into the CMS. Any other editors that use your schema will likely also flag the file as invalid. That could also affect transformation engines (such as XSLT) as they typically require documents to be valid before proceeding with a transformation. If any of these things are important to you then you should avoid #2.

If you are looking at a 3rd option please provide more detail.