Difference between revisions of "LRM xhtml Support"
(→Setting up XHTML resource files definition) |
(→xhtml parser type) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 16: | Line 16: | ||
== ''xhtml'' parser type == |
== ''xhtml'' parser type == |
||
− | A well-formed document in XML, such as .dita files, can be parsed by using the ''xhtml'' parser type. If there are well-defined keys/values, such as in a ''.resx'' or ''strings.xml'' file then the [[ |
+ | A well-formed document in XML, such as .dita files, can be parsed by using the ''xhtml'' parser type. If there are well-defined keys/values, such as in a ''.resx'' or ''strings.xml'' file then the [[LRM_XML_Support|''xml'']] parser type should be used. |
== LRM interaction with xhtml parser type files == |
== LRM interaction with xhtml parser type files == |
||
Line 30: | Line 30: | ||
See [[On_Boarding_an_LRM_Project|''Onboarding an LRM project'']] for information on how to set up a LRM project. For the resource extension, choose the 'XHTML' extension. |
See [[On_Boarding_an_LRM_Project|''Onboarding an LRM project'']] for information on how to set up a LRM project. For the resource extension, choose the 'XHTML' extension. |
||
− | [[File: |
+ | [[File:XhtmlParserType2.png]] |
+ | |||
=== Setting up DITA type resource files === |
=== Setting up DITA type resource files === |
||
DITA files are usually located in subfolders that are under a locale folder. For information on setting up this type of file structure for your resource files see [[Subfolder_under_locale_folder|Subfolder setup]] |
DITA files are usually located in subfolders that are under a locale folder. For information on setting up this type of file structure for your resource files see [[Subfolder_under_locale_folder|Subfolder setup]] |
Latest revision as of 19:20, 16 July 2020
Contents
Examples of files that uses the xhtml parser type
DITA type file: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd"> <map id="component_CountryIdentifier" xml:lang="en"> <topicref href="ChapterIntro.dita"> <title></title> </topicref> </map>
Note-it is suggested that any href are not locale dependent. For example, in the above example, ChapterIntro.dita is not locale dependent. An example of a locale dependent file name would be ChapterIntro-en.dita. If there is a locale dependent file name then it is the responsibility of either the translation service or a developer to change the name of the file to the appropriate locale (for example, ChapterIntro-fr.dita' for a French locale)
xhtml parser type
A well-formed document in XML, such as .dita files, can be parsed by using the xhtml parser type. If there are well-defined keys/values, such as in a .resx or strings.xml file then the xml parser type should be used.
LRM interaction with xhtml parser type files
Number of keys in file is 1
All files that are parsed using the xhtml parser have only 1 key called key1. The value that corresponds to this key is the entire xhtml type file. Because there are no key/values pairs, xhtml parsed files cannot be instrumented (used in our InContext Reviewer/Translation product).
Prep kit files are always full file
If the checksum of the base file has changed then the file will be sent out in the next prep kit for all target locales. Since the file contains only 1 key, the entire file will be sent out for translation.
File can be pseudo-localized and number of words counted
Since LRM is able to parse the text portion of xhtml parsed files, the files can be pseudo-localized and the number of words counted.
Setting up XHTML resource files definition
See Onboarding an LRM project for information on how to set up a LRM project. For the resource extension, choose the 'XHTML' extension.
Setting up DITA type resource files
DITA files are usually located in subfolders that are under a locale folder. For information on setting up this type of file structure for your resource files see Subfolder setup