Defining XML Rules |
When an XML document is inserted into Alchemy CATALYST, both the markup and content are processed, however unless an element/attribute is selected to be localized, it will not be displayed in the workspace. By default, Alchemy CATALYST assumes nothing is to be translated in an XML document unless a rule defines that the element/attribute is to be translated.
Follow these instructions to specify an element/attribute for translation:-
Select Tools - Options - ezParse from the main menu.
Click on XML Based Files in the File Group list.
Select a rule name and click the Edit Rule button. The following ezParse editor will appear:-
This dialog displays the DTD or schema of XML documents. A list of available methods or behaviors will be displayed beside each element and attribute. By selecting a suitable method, you can program Alchemy CATALYST and how it processes XML documents.
Don't worry if an XML document does not have a schema or DTD, Alchemy CATALYST will automatically scan the document for you and build it. |
To select an element and its content for translation, simply double-click on it. The color of an element changes when it is selected for translation.
To select a method, click the check-box in the appropriate column adjacent to each element or attribute.
There are several methods that can be used to process an element/attribute,
Once you can selected each element/attribute for translation you can save the rule by clicking OK.
Your Rule is now automatically saved in the Alchemy CATALYST registry. Next time you insert an XML document into a Project TTK, you will be requested to select the appropriate rule for your XML document from a list displayed on the screen. Alchemy CATALYST will then process the XML document based on the rule you have selected and display only those elements specified for translation in the workspace pane.
If you have XML files with continually changing structure/element names or lots of different files with different attribute and element names then you may find that it requires a lot of work to create an individual ezParse rule for each XML file to be localized. Alchemy CATALYST simplifies this process by providing a rule call Show All. This is a default rule that displays all elements/attributes in an XML document so that it can easily be translated without creating a custom rule for it.
This Show All rule is always presented as an option when an XML document is inserted into a Project TTK.
Create a simple ezParse rule for an XML document.
Learn more about XML Documents.
Learn how to specify conditions in ezParse rules.
Learn how to define a translation-target in multi-lingual XML documents.