• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Changing read write rules for S1000D

Explorer ,
Mar 31, 2021 Mar 31, 2021

Copy link to clipboard

Copied

Hi all,

I want to make some small changes in S1000D tables (for instance Require Condition in the procedural module) in Adobe Frame Maker 2019, S1000D. I changed ".edd", ".tpl", ".rwr".  But when I want to save a procedural module, I got various errors. I want to know which files do the validation when saving any data module? 

As a simple action, I tried to change the size of the column of the "fm.reqCondGroup" table in .rwr. file but I couldn't see the changes' effect. Do I miss anything here? 

element "fm.reqCondGroup" {
is fm table element;
fm property columns value is "1";
fm property column widths value is "170mm";  I changed this value
fm property table format value is "S1000Dwide";
}

 What is strange for me is that in FM when you want to create a "fm.reqCondGroup" the default value of columns is 3, however it is defined as "1" in .rwr file. So, I thought maybe another file is responsible for the validation.

reqCondGroup.PNG

It will save me lots of effort and time if you have any ideas regarding this issue.

Have a great day.

 

TOPICS
Scripting , Structured , XML author

Views

461

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Mar 31, 2021 Mar 31, 2021

Hello Sanam,
Validation

Validation of the S1000D data module should happen in three places!

  1. Before you save the module it must be valid in the FrameMaker environment this is where it must match the structure defined in the EDD.
  2. When you save the data module, the intermediate XML will be validated against the DTD that matches the EDD structure. This is where read/write rule errors can cause problems and prevent the correct output to the true S1000D XML.
  3. The XSLT transformation uses the intermediate XM
...

Votes

Translate

Translate
Enthusiast ,
Mar 31, 2021 Mar 31, 2021

Copy link to clipboard

Copied

Hello Sanam,
Validation

Validation of the S1000D data module should happen in three places!

  1. Before you save the module it must be valid in the FrameMaker environment this is where it must match the structure defined in the EDD.
  2. When you save the data module, the intermediate XML will be validated against the DTD that matches the EDD structure. This is where read/write rule errors can cause problems and prevent the correct output to the true S1000D XML.
  3. The XSLT transformation uses the intermediate XML as the source for the final output that is validated against the S1000D XSD Schema. 

Clearly this is a lot of validation and potential for invalid XML to cause problems. That's why there are the special settings in the S1000D Options dialog to manage validation. Select the General tab where you will find the options:

  • Do not export invalid XML - This was added to prevent saving the intermediate file as the final output which would cause a great deal of confusion! 
  • Post XSLT validation of XML on export - After the XSLT transformation the result is validated using the schema reference in the file so that it's independent of FrameMaker XML application influence.

ReadWrite Rules for tables

This certainly looks odd, but there is some sense to it! 

  • The fm property columns value is "1"; line is telling the XML handler that this table must only have one column in this instance.
  • The fm property table format value is "S1000Dwide"; line is then telling the formatting engine to apply a specific table format. 

The number of columns in the table takes priority over other properties that are defined in a table format. The reason for having three columns as the default for the S1000Dwide format is to make normal editing easier for the author. In this case we use this format because it does not have a left indent. You can change the default in the main structured templates and these will be used the next time you open an XML data module.

 

I hope that helps

Ian

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 31, 2021 Mar 31, 2021

Copy link to clipboard

Copied

Thanks, Ian,

It helped a lot.

Sanam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Mar 31, 2021 Mar 31, 2021

Copy link to clipboard

Copied

Sanamdeh,

   Since you asked which files control validation and mentioned .edd, tpl, and .rwr, let me add to Ian's reply some general comments (not specified to S1000D) about the role of these types of files when you work with XML in FrameMaker:

   An Element Definition Document or EDD defines the elements and attributes to be used in a project and associates formatting information with individual elements. It is analogous to a schema or DTD in XML along with a stylesheet. An EDD is never used directly. Instead, the element definitions it contains are imported from the EDD into another FrameMaker document.

   A template is a FrameMaker document that contains formatting information and possibly element definitions that are used in other FrameMaker documents. For example, a template defines various formats or styles (such as paragraph, character and table formats) and page layouts.

    Use an EDD in either of two ways:

    1. Open both a template and the EDD. When the template is current, use File > Import > Element Definitions to replace any existing element definitions in the template with those defined in the EDD.

    2. Suppose you have an existing FrameMaker document, but have changed your EDD since the document was created. You can open the document and the EDD and import element definitions from the EDD into the document. Alternatively, once the revised element definitions have been imported into the template, you can open the document and the template and use the above command to import element definitions from the template into the document.

   A template can also be used to create a new FrameMaker document or revise an existing one. The File > New > Document command prompts for the template that will form the foundation of the new document. When you open an XML document, FrameMaker uses an XML application that specifies the template to use.  When you revise a template, you can import format changes into existing documents with File > Import > Formats and 

   Read/write rules modify FrameMaker's default correspondence between its own representation of elements and XML attributes and that of XML. FrameMaker uses these rules whenever you read (open or import) XML or when you write (or export) XML. In your example, you have three rules of the form:

      fm property x value is "y";

Such rules pertain to an element used for a FrameMaker formatting object other than a paragraph or text range within a paragraph. Examples include tables, graphics, and cross-references. Each such element has a fixed list of properties and read/write rules may map them to an XML attribute or assigned fixed values. "Value is" does the latter and tells FrameMaker to use the specified value when reading XML and not to represent the property's value when writing XML. Read/write rules are not used when you are editing FrameMaker documents.

   Thus, your rule

       fm property column widths value is "170mm";

tells FrameMaker how wide to make columns in tables it reads from XML. It does not affect tables you create when you are editing in FrameMaker. To specify the default column width in FrameMaker do the following:

1. Open your template.

2. Use Table > Insert Table to create a new table. Specify that the new table should use the format you want to change and the number of columns you will typically use for that type of table.

3. Click in a column you want to resize (or select an entire row if you want all columns to be the same size).

4. Use Table > Resize Columns to set the column width.

5. Use Table > Format > Table Designer to open the table designer.

6. Click Update Style.

7. Delete the table from the document.

8. Save the template.

 

       --Lynne 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 01, 2021 Apr 01, 2021

Copy link to clipboard

Copied

LATEST

Thanks for your detailed answer. Really helpful.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines