I think this is a very simple question (and apologise if I have just repeated someone else - I looked but could not find the answer I was looking for).
I have used Structured Framemaker for quite some time but am only now looking into XML output and roundtripping.
The issue I have is I cannot seem to get the read / write rules to do anything - they do not seem to interact with the writing or reading of XML.
Now I am sure that I have missed something very, very simple (and not for the first time) so it would be great if someone can tell me what I am doing wrong. So...
The Input XML script shown here has an element named "Para", as well as various other elements that are named exactly as they are in FM (Paragraph, Section, Document, etc...)
---
<Document><Title>Round Trip Test Document</Title>
<Section><Title>Section one - Waking up</Title>
<Para>This should be a standard Paragraph Element in FM <Emphasis>emphasised </Emphasis>text in
a paragraph.</Para>
<Paragraph ID = "GFJHDEAB">This is the second paragraph in the first section</Paragraph>
<Section ID = "BABBCABA"><Title>Section one point one. Tips for getting out of bed</Title>
<Paragraph>This is the first paragraph in the first nested section</Paragraph></Section></Section>
<Section><Title>Section two - making the tea</Title>
<Paragraph>This is a cross reference to <Xref IDref = "BABBCABA" Format = "Section"/></Paragraph>
<Paragraph>This section includes and anchored frame for a table followed by a graphic</Paragraph></Section></Document>
---
I want my read/write rules to map any instances of 'Para' element to the FM element "Paragraph".
So the read / write rules have the following lines:
fm version is "9.0";
/*
* Include all ISO entity mapping rules.
*/
#include "isoall.rw"
element "Para" is fm element "Paragraph";
---
Structapps application (QuickStart) is pointing to the correct rules file:
Application name: | QuckStart |
DOCTYPE: | Document |
Template: | C:\Users\astirling\Desktop\STRUCTURED FRAMEMAKER\StructuredXMLTest1\StructuredTemplate#1.fm |
DTD: | C:\Users\astirling\Desktop\STRUCTURED FRAMEMAKER\StructuredXMLTest1\StructTestOne.dtd |
Read/write rules: | C:\Users\astirling\Desktop\STRUCTURED FRAMEMAKER\StructuredXMLTest1\rules.fm |
--
But when I open the XML I get:
And the structure shows the same thing:
---
So why has the XML element 'Para' not been changed into FM element 'Paragraph'. I know that the element 'Para' is an unknown element - thus the rule telling it to map this to the 'Paragraph' element.
FM > XML
When I output from FM to XML I have followed all the instructions from the manuals and cannot get these process to work either. The Output XML is exactly the same if I have rules or not.
i.e. if I map my FM elements, to elements of the same name but all in lowercase - the output XML shows the element names exactly as they are in FM, as though there were no rules involved.
Any help would be appreciated, Cheers.
Alan