to support a specific XML file structure. Essentially the XML file converter needs to know which parts of a particular XML file are to be translated. This information is provided to the XML converter via XSL extended stylesheets. These stylesheets are called XML parsers. An XML parser points out the elements to be translated in an XML file.
RC-WinTrans processes (reads/writes) XML files using an XSL transformation. An XSL stylesheet acts as a parser reading a certain XML file format and specifying which data is to be translated.
The RC-WinTrans Developer Help contains information and examples to help maintain/create XML parser files.
Option 1: Local Folder Place the XML parser stylesheet (.xsl) in the same folder as the XML files to be translated. This causes the XML parser to be used only on XML files located in the same folder.
Usage: Used when all XML files to be translated are only in one folder.
----------------------------------------------------------------------------------------------------------------------------------------------
Option 2: General "FileConverter" Folder Putting the XML parser style sheets in the "FileConverter" folder causes the XML parser to be used globally for XML files in any folder. Usage: Used when the XML files to be translated are in different folders.
RC-WINTRANS 9.0 – 9.3 Place the XML parser file in the RC-WinTrans installation folder named "FileConverter": <installdir>\RC-WinTrans\RC-WinTrans 10l\FileConverter\
RC-WinTrans 9.4 Use the menu commands "File" | "Folders..." | "XML Parser Stylesheets (All User)..."
RC-WINTRANS 10 and later:
>> Drag&Drop Move and drop the XML Parser stylesheet file to the RC-WinTrans application window. The Windows file explorer will be opened to view the file in the "FileConverters" folder.
>> Copy to "File Converters" Folder Use the menu commands "File" | "Folders..." | "XML Parser Stylesheets (All User)..."
RC-WinTrans will look for the XML parser stylesheet (.xsl) in the same folder as the one containing the XML file to be translated (local folder, option 1) first. If a converter is not found there, RC-WinTrans will check the "FileConverters" folder (option 2) for the required XML parser styesheet.
XML parser files (file extension:.xsl) have a predefined file naming convention. It dictates that the file name begin with the prefix "XMLParser-" followed by the name of the root element of the XML file for which the parser is made.
EXAMPLE: "XMLParser-Symbols.xsl"; "XMLParser-docroot.xsl"
Note: If the name of the XML root element contains a namespace then an underline character must be used in the file name for the ':' between the namespace and the root element name
EXAMPLE: root element name <mnts:materials> XML parser file name "XMLParser-mnts_materials"
Examples to use in creating your own XML parser (XSL stylesheet) to translate an XML file can be found in the RC-WinTrans Developer Help.
|
|