Skip to main content
Known Participant
August 16, 2010
Answered

XML export Issue FM9

  • August 16, 2010
  • 7 replies
  • 4816 views

Hello,

When exporting to XML "File-Save as XML"

FM does not export all the information. Below is the the Structure view:

The XML output from this is:

<ref>
<ref-setup-item id = "o00009-9-1230-783-00004">
<link local = "m00003-9-1230-783-00001" id = "m00003-9-1230-783-00001"></ref-setup-item>
<ref-setup-item id = "o00009-9-1230-783-00007">
<link local = "s00001-9-1230-783-00050" id = "s00001-9-1230-783-00050"></ref-setup-item>
<ref-setup-item id = "o00009-9-1230-783-00010">
<link local = "o00031-9-1230-783-00001" id = "o00031-9-1230-783-00001"></ref-setup-item></ref>

As you see the "link" element text is missing and is not closed...any thoughts?

This topic has been closed for replies.
Correct answer jim_monaco

Yes of course - this would be my answer.  You do not need to force it to a Frame link structure - it can be treated just like any other XML structure assuming that you have code that knows how to convert the original XML structure into a link in HTML.  Make it a containter and get rid of the R/W rules and it should come out just like the original DTD spec.

Jim

7 replies

mjdeslonAuthor
Known Participant
August 19, 2010

Would it be possible to just change the Link element to a container in the EDD. I do not care about the cross references in frame...i just need something i can use to generate HTML later.

jim_monacoCorrect answer
Inspiring
August 19, 2010

Yes of course - this would be my answer.  You do not need to force it to a Frame link structure - it can be treated just like any other XML structure assuming that you have code that knows how to convert the original XML structure into a link in HTML.  Make it a containter and get rid of the R/W rules and it should come out just like the original DTD spec.

Jim

mjdeslonAuthor
Known Participant
August 19, 2010

Ok this is the setup I have in the EDD:

I removed the r/w rules...

now I cannot add the title element to the document! I imported the EDD...still no luck...the element is just like it was before...any thoughts.


EDIT: Never mind...just added another link element...

Michael D

mjdeslonAuthor
Known Participant
August 18, 2010

I do not need frame to create a reference...i just need it to create something i can translate to html later...I hope that makes sense.

Legend
August 18, 2010

Michael (D),

Got your DTD.  I'm wondering, are you suggesting that the government would be intractable in its demands for something, even if that something makes little sense and is of no use to anyone? Surely you jest.

Anyway, there needs to be some kind of link, and normally it is based on a match between the ID and IDREF attributes. Then, if you are building something that publishes to HTML, it resolves them to do whatever you require. For example, a web-based publisher might encounter a <link> element, recognize it as a hyperlink, and create an <a> hyperlink for the HTML using the content in its IDREF attribute. You would probably want to go one step further and seek out the target element in order to extract the text for the hyperlink, much like Frame does when you update a cross-reference.

Is this the kind of thing you are talking about?

I might need until the morning to experiment again with your files.

Russ

mjdeslonAuthor
Known Participant
August 18, 2010

I wish I was joking

That is exactly what i am looking for.

Thanks Russ

Michael Deslongchamps

mjdeslonAuthor
Known Participant
August 18, 2010

I cannot change the DTD it is provided for me by the government and it cannot be manipulated.

mjdeslonAuthor
Known Participant
August 18, 2010

Ok. I think I know what the problem is.

The problem is in the Read/Write rules. The "title" element is part of the cross-reference structure, but is not being exported.

The read/write rules currently being used for the "link" element is:

element "link" {
   is fm cross reference element;
   }

What do i need to do to force FM to add the title element

I tried

element "link" {
   is fm cross reference element;

   element "title" is fm element;
   }

but this generated an error...any thoughts?

Michael

Inspiring
August 18, 2010

Hi Michael,

Looks pretty weird.., Framemaker cross reference - type elements cannot have content, their counterpart in XML must be an empty element. R/W-rules cannot create element structures, so you cannot create the title-element from thin air.

What is your DTD definition for the cross-refrence structure?. What should the title-element contain?

BR, Martti

mjdeslonAuthor
Known Participant
August 17, 2010

Any experts out there have an email address I can use to send these files too...i have been staring at the same problem for 2 days now...

Legend
August 17, 2010

Michael,

There are plenty of folks with more expertise than me, but I'd be willing to take a look. russ@weststreetconsulting.com.

Russ

mjdeslonAuthor
Known Participant
August 17, 2010

Is there some way I can upload the files that I am using...i do not see that option anymore.

Michael

Legend
August 17, 2010

I don't see it either. Maybe a host can weigh in.

Inspiring
August 16, 2010

Hi,

Is link-element a Framemaker cross-reference element?. If so, the element content is left empty during xml export. If not, check the r/w rules associates to structured application used for link element.

Hope this helps,

Martti


(back after a long time..)

mjdeslonAuthor
Known Participant
August 16, 2010

I changed the type to container, and removed the R/W rules but I am still getting the error "Expected end of tag 'link' "

And it is still not exporting all the information and not closing the tag...very strange.

Michael_Müller-Hillebrand
Legend
August 16, 2010

Hi mj,

I seems you have to share more of your setup. If you select Save As XML multiple things come into play:

a) R/W rules

b) optional structure client

c) optional post-processing XSL

d) external DTD

All those things have to fit to successfully create XML output. You might want to make sure b) and c) are not active, by checking the Structured Application definition. BTW, it is not possible to simply change the element type in the EDD, you also have to import them into the document, and possibly create a new external DTD. Containers have a rounded-rectangle appearance in Structure View and I see the <link> elements as normal rectangles.

- Michael