Highlighted

Bad instructions - Test XML roundtripping

Participant ,
Jun 25, 2015

Copy link to clipboard

Copied

As previously stated in the thread: Bad instructions in the FrameMaker 2015 Help File, sections have been rearranged, and references poorly established, such that it is difficult to understand the procedure for working in structured FrameMaker.

Despite the problems, I managed to discern what the text was trying to say, and I had created an application before continuing with subsequent sections. In particular, I had created an application using the following sections:

Build a structured application

Create a DTD

Create a structured template

Configure the structured application

Copy the application files

As noted in the previous thread, you can't create the DTD prior to configuring the application, so the order of these sections actually needs to be:

Build a structured application

Configure the structured application

Create a DTD

Create a structured template

Copy the application files

Now, in the Configure the structured application section, I note lines (4) and (5), which state:

4)Insert a DTD element and specify the following as the DTD element text:

  $STRUCTDIR/proposal/proposal.dtd

5)Insert a Template element and specify the following as the Template element text:

  $STRUCTDIR/proposal/proposal_template.fm

6)Select File > Save to save the structapps.fm file.

Fine and good, and I'm able to proceed with creating both a DTD and structured template, which are then manually placed in the indicated application locations.

However, moving on to the subsequent procedure for Test XML roundtripping, I note the following:

For the line, "1) Create a valid structured proposal in FrameMaker," this line actually needs to be its own paragraph before the number starts:

Create a valid structured proposal in FrameMaker, as follows:

And the next line needs to be:

1) Export the structured_proposal.fm file to XML. To do so, select File > Save As XML. If prompted, select the Proposal application.

Fair enough. But now I'm dead stop because there is a parsing error when saving the XML. Here is the Console output:

Save as XML Log

Source Document: C:\FM_WorkFiles\structured_proposal.fm

Destination Document: C:\FM_WorkFiles\structured_proposal.xml

XML Parser Messages (Document Prolog)

Error at file C:\Users\Access\AppData\Local\Temp\FMT7BDB.tmp, line 3, char 3, Message: Could not open DTD file: C:\Users\Access\AppData\Local\Temp\$STRUCTDIR\proposal\proposal.dtd

Parse error at line 3, char 1: Error in processing external entity reference

Parsing aborted.

Error at file C:\FM_WorkFiles\structured_proposal.xml.E46, line 3, char 3, Message: Could not open DTD file: C:\FM_WorkFiles\$STRUCTDIR/proposal/proposal.dtd

Parse error at line 3, char 1: Error in processing external entity reference

Parsing aborted.

It appears that FrameMaker is not referencing the $STRUCTDIR path as expected. It is as if FM is taking my current working directory, then appending the proposal.dtd path from the application definition.

What further complicates matters are the forward slashes that I unintentionally typed when first creating the application, and though I fixed (replaced) them with backslashes, FM seems to be pulling the forward slashes from a temporary file.

Can anyone verify what I'm seeing, and make suggestions about how this sample project should be configured?

TOPICS
Structured

Views

653

Likes

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

Bad instructions - Test XML roundtripping

Participant ,
Jun 25, 2015

Copy link to clipboard

Copied

As previously stated in the thread: Bad instructions in the FrameMaker 2015 Help File, sections have been rearranged, and references poorly established, such that it is difficult to understand the procedure for working in structured FrameMaker.

Despite the problems, I managed to discern what the text was trying to say, and I had created an application before continuing with subsequent sections. In particular, I had created an application using the following sections:

Build a structured application

Create a DTD

Create a structured template

Configure the structured application

Copy the application files

As noted in the previous thread, you can't create the DTD prior to configuring the application, so the order of these sections actually needs to be:

Build a structured application

Configure the structured application

Create a DTD

Create a structured template

Copy the application files

Now, in the Configure the structured application section, I note lines (4) and (5), which state:

4)Insert a DTD element and specify the following as the DTD element text:

  $STRUCTDIR/proposal/proposal.dtd

5)Insert a Template element and specify the following as the Template element text:

  $STRUCTDIR/proposal/proposal_template.fm

6)Select File > Save to save the structapps.fm file.

Fine and good, and I'm able to proceed with creating both a DTD and structured template, which are then manually placed in the indicated application locations.

However, moving on to the subsequent procedure for Test XML roundtripping, I note the following:

For the line, "1) Create a valid structured proposal in FrameMaker," this line actually needs to be its own paragraph before the number starts:

Create a valid structured proposal in FrameMaker, as follows:

And the next line needs to be:

1) Export the structured_proposal.fm file to XML. To do so, select File > Save As XML. If prompted, select the Proposal application.

Fair enough. But now I'm dead stop because there is a parsing error when saving the XML. Here is the Console output:

Save as XML Log

Source Document: C:\FM_WorkFiles\structured_proposal.fm

Destination Document: C:\FM_WorkFiles\structured_proposal.xml

XML Parser Messages (Document Prolog)

Error at file C:\Users\Access\AppData\Local\Temp\FMT7BDB.tmp, line 3, char 3, Message: Could not open DTD file: C:\Users\Access\AppData\Local\Temp\$STRUCTDIR\proposal\proposal.dtd

Parse error at line 3, char 1: Error in processing external entity reference

Parsing aborted.

Error at file C:\FM_WorkFiles\structured_proposal.xml.E46, line 3, char 3, Message: Could not open DTD file: C:\FM_WorkFiles\$STRUCTDIR/proposal/proposal.dtd

Parse error at line 3, char 1: Error in processing external entity reference

Parsing aborted.

It appears that FrameMaker is not referencing the $STRUCTDIR path as expected. It is as if FM is taking my current working directory, then appending the proposal.dtd path from the application definition.

What further complicates matters are the forward slashes that I unintentionally typed when first creating the application, and though I fixed (replaced) them with backslashes, FM seems to be pulling the forward slashes from a temporary file.

Can anyone verify what I'm seeing, and make suggestions about how this sample project should be configured?

TOPICS
Structured

Views

654

Likes

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
Jun 25, 2015 0
Contributor ,
Jun 25, 2015

Copy link to clipboard

Copied

Ok, lets get things sorted first:

  • you are trying to develop a structured application with DTD, EDD and everything else needed to roundtrip some FM binary to XML and back, correct?
  • you try to do this by following the help file/documentation of FM 2015 line by line!?
  • good luck with that - it will actually not work out that way

I'm working with this kind of stuff on a daily basis, and I didn't come up with more info about it than I just listed.

So, I suggest, before you start fiddling around with some obscure documentation (FMs docs are known for not really being helpful for beginners), you should read up about the general concept of structured documents and how FM handles them.

Creating a DTD is as easy as opening some empty text file in notepad and starting to type (WHEN you know how to create a DTD from scratch).

FM _can_ support you with it, when you know how to build a proper EDD.

The other way round FM can support you creating an EDD from an existing DTD. But it is not necessary to create both using FM. And it will not be enough to create both.

You will also need to create a read write rules file, which will handle the XML transition between EDD and DTD and thus the roundtripping.

You will then need to setup a structured application that tells FM about the whereabouts of EDD, DTD, RWR and also handles some other, more advanced, stuff.

Roundtripping FM binaries to XML and back is essentially a moderate on a difficulty scale in FM data handling.

Before you even start to roundtrip, you should first get some EDD set up correctly and get the one way export to XML sorted (and I'm not talking about 'hello world' examples here).

After you managed to do that, you can proceed with trying to roundtrip that XML back. It's not as easy as it seems at first glance.

If you need help with any of that, this forum is the place to get answers.

But it is not helping you with ranting over some obscure documentation, which tries to simplify an extremely complex process.

You need to ask the right questions to get the answers you need - asking about a FM documentation, that none (I bet) of the more experienced users has read, is simply pointless.

-Alex

Likes

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
Reply
Loading...
Jun 25, 2015 0
Participant ,
Jun 26, 2015

Copy link to clipboard

Copied

Say Alex, you understand that I'm pointing out issues in order to resolve problems in the FrameMaker documentation. Being helpful and providing information does not make it a rant.

Yes, yes, one needs to understand the relationships between the XML files and the EDD and the Attributes and the CSS file and the conversion table and PATH and ExtendScript and combining all of that into a ditamap and book, and then compile all that into the CHM or WebHellp or PDF or whatever that the product calls for. See, I can type vague descriptions, too.

As I previously stated, I'm quite familiar with the FrameMaker procedures, which is why I reviewed the FrameMaker documentation because I recalled there being problems there for new users.

As such, my comments are mainly for the Adobe staff, who are probably not aware of the problems in the FM documentation, and second my comments are for new people that are boggled by the documentation. My comments point out specific quirks in the FM documentation, though that is not a substitute for Adobe to hire an actual technical writer to fix the documentation.

That said, it is not helpful to declare my posts as rants. It is not appropriate for you to state that because it diminishes factual issues with FrameMaker documentation that otherwise have been going unaddressed.

It is not excusable that, the documentation having errors in the past, should be allowed to continue having errors that undermine new users that are seeking to learn the product.

Alex, in my post I pointed out a specific problem where there is a parsing error with a BASIC example. From your tone, it does not sound like you read the information that I provided, and instead went on a little tirade about how silly it is to try understanding FrameMaker documentation, without pointing out alternative sources of information. If you're not willing to actually contribute by understanding the question as posted, then it is perfectly okay for you to not post.

Likes

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
Reply
Loading...
Jun 26, 2015 0
Contributor ,
Jun 26, 2015

Copy link to clipboard

Copied

Actually I've read both of your posts before answering and the general information you were trying to provide got lost in the details so much, I couldn't see the tree in the forest. I apologize for maybe sounding a bit harsh, but I've read too many similar posts from actual newcomers that tried to run before they learned to walk.

Usually that ends up with bickering over some details, while not accepting, that there's a steep learning curve to master.

I've personally fought with the documentation set of FM too, when starting out with all this - but I've been pointed to the same ambiguous sources as I did - and I found it being very helpful after all.

FM is actually not a program that has lots of support or good information about it, as it's more of a niche product. So finding your way by yourself is a good start. But that might just be my opinion.

I offered assistance to specific questions in the end of my post. But telling from your reaction, I guess you didn't realize that.

That said, I'm not feeding this conversation anymore, as this is off-topic and of no relevance at all.

Likes

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
Reply
Loading...
Jun 26, 2015 0
Participant ,
Jun 26, 2015

Copy link to clipboard

Copied

For those that are TL;DR

There appears to be a parsing bug in FrameMaker 2015. I am asking someone to confirm the bug, or state factually that it is a problem with incorrect FrameMaker documentation.

In the description for Configuring the structured application, the instructions state:

4)Insert a DTD element and specify the following as the DTD element text:

  $STRUCTDIR/proposal/proposal.dtd

5)Insert a Template element and specify the following as the Template element text:

  $STRUCTDIR/proposal/proposal_template.fm

6)Select File > Save to save the structapps.fm file.

However, when later doing a roundtripping test, there is a parsing error.

Save as XML Log

Source Document: C:\FM_WorkFiles\structured_proposal.fm

Destination Document: C:\FM_WorkFiles\structured_proposal.xml

XML Parser Messages (Document Prolog)

Error at file C:\Users\Access\AppData\Local\Temp\FMT7BDB.tmp, line 3, char 3, Message: Could not open DTD file: C:\Users\Access\AppData\Local\Temp\$STRUCTDIR\proposal\proposal.dtd

Parse error at line 3, char 1: Error in processing external entity reference

Parsing aborted.

Error at file C:\FM_WorkFiles\structured_proposal.xml.E46, line 3, char 3, Message: Could not open DTD file: C:\FM_WorkFiles\$STRUCTDIR/proposal/proposal.dtd

Parse error at line 3, char 1: Error in processing external entity reference

Parsing aborted.

Thanks

Likes

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
Reply
Loading...
Jun 26, 2015 0
Mentor ,
Aug 27, 2015

Copy link to clipboard

Copied

Eager, can you post the first few lines of your XML file? Especially the DTD reference? I think there is some discrepancy with how the DTD reference is written versus how you are attempting to locate it in the StructApps file.

Russ

Likes

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
Reply
Loading...
Aug 27, 2015 0
Participant ,
Aug 27, 2015

Copy link to clipboard

Copied

Here's the first three lines from the structured_proposal.xml file that I had created:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE Proposal SYSTEM "$STRUCTDIR/proposal/proposal.dtd" [

]>

Looking at the parsing error message, the "$STRUCTDIR/proposal/proposal.dtd" is being appended in a strange way.

And the parsing error makes a second reference, where you notice the mixup between forward-slash and backward-slash characters.

Unfortunately, it's been a month since I was looking at this, so I need to review the steps in order to refresh my memory. Maybe I can do a review tomorrow. When I do that, I'll also refer to Roman's advice.

Likes

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
Reply
Loading...
Aug 27, 2015 0
Mentor ,
Aug 28, 2015

Copy link to clipboard

Copied

Something is definitely wrong here with the system's use of $STRUCTDIR. For some reason, it is not resolving this variable but I do not know why. It is a difficult thing to troubleshoot from afar. I am sure, though, that it should never write this string to your XML file.

Russ

Likes

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
Reply
Loading...
Aug 28, 2015 0
Community Beginner ,
Aug 26, 2015

Copy link to clipboard

Copied

I have tried this example in the FM developer docs and did have the same parsing error. I was able to correct this by NOT manually typing into the structdoc.fm file, but rather using Structured Application Designer in the Structure Tools menu. Fill out each of the sections by selecting you DTD, EDD and template that you created in the Proposal lesson. Name your application Proposal and click Save. Restart Framemaker and you should not receive the parsing error as you did when you manually typed in the file paths. For the sake of this lesson you don't have to place your DTD and template into the Framemaker installation folder - they can be anywhere even in a desktop folder.

Likes

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
Reply
Loading...
Aug 26, 2015 0