Skip to main content
Inspiring
April 16, 2019
Question

Creating a new document from the Welcome screen, doesn't

  • April 16, 2019
  • 1 reply
  • 2965 views

I think this must be really simple but I can't see the problem.

I've defined a structured application with DOCTYPE, DTD, Template, read/write rules, pre- and post-processor stylesheets.

I can open an existing XML document and everything works.

On the Welcome screen under "Create a new document" there is a button labelled "<xml/>" with the name of my application, and lots of other buttons indicating document types in other structured applications.

If I click any of the other buttons, Frame opens either an empty or trivial document, called "UntitledN.xml", and sets the structured application to that appropriate to the button I clicked.

If I click the button corresponding to my application, nothing happens.

I can't see any relevant difference between my application and the others - both have paths provided to template.fm documents (which exist), DTD and so on.

Can anyone help me here please?

Cheers,

T

This topic has been closed for replies.

1 reply

Inspiring
April 16, 2019

Trevor,

   Try the "... Other XML" button rather than the "<xml/> Empty XML" button. "Other XML" lets you choose an application. "Empty XML", which was available in FM 2017 but is gone in FM 2019, creates a new document with only one element defined: <ROOT>. In code view, you can add additional elements.

          --Lynne

Inspiring
April 17, 2019

Hi

Actually I tried going through "other XML" > Structured Applications > myapplication first (which also appeared to do nothing at all), and then noticed that there was a button at the top with myapplication and empty XML. I assumed Frame had added that button because I have been editing other documents in my application.

I only noticed this problem because I was trying to explain how to set up a new FM user - my notes (which started with an older version of Frame) said "use Edit > Preferences > General to set your product interface to 'Structured Framemaker', and then use Structure > Set Structured Application to set the application to 'myapplication'". It turns out that this second step is only possible if you already have a document open, i.e. you can't do it from the welcome screen. So how do I create an empty 'myapplication' document? Apparently I can't - but it ought to be possible because Every Other Option in the Structured Applications list opens a basic document when selected. Mine is the only application which doesn't. So I've evidently got something wrong, but the documentation isn't helping me find what that is!

Inspiring
May 9, 2019

Trevor,

   At this point we know that:

1) You can use the New XML dialog to create new XML documents for some applications but not for yours.

2) FM does not report an error when it fails to create a new XML document, at least when the failure is due to its inability to find one of the application files.

   If I were in your situation, I would compare the failing application to a working one. I would make a small change to one or the other repeatedly until the behavior changed which would give me a clue about what the significant difference might be. For example, can you create a new XML document if you remove the pre-process from your application? If so, the pre-process is not the problem, so continue your debugging without it. If not, what if you use a simpler pre-process? Is there content (such as sample text) in your application's template? If so, what happens if you delete that content?

   I did my testing using an application based on the simple DTD:

      <!ELEMENT document (paragraph)+>

      <!ELEMENT paragraph (#PCDATA)>

I opened it to create an EDD and FM set the first element type (document) to be valid at the highest level. I didn't add any format rules and imported element definitions from the EDD into a new portrait document and saved that file as the template. I defined an application that specified the DTD, the template, and a simple pre-process that simply adds a new paragraph containing a few words at the beginning of a document. The latest version of the application does not use r/w rules.  What is the significant difference between my application and yours?

  If you create a similar application, does New XML create new files from that application?

     --Lynne


Hi Lynn

So I have a little testing app, just like yours.

First, I'd just note that I have made two changes to the installed maker.ini file:

RemoveExtraWhiteSpacesOnXMLImport=Off

StructureDir=C:\Users\trevor\doco\current\framemaker_files\Structure

So here's my DTD:

And here's the EDD:

I created a new template, imported the element definitions from this EDD, and saved it as template.fm in the same folder.

The structapps.fm file (at the path shown in maker.ini above) currently contains everything that came in the installed structapps.fm file, plus my helpcenter and testing applications. I should probably purge all the applications we don't use because I haven't copied across all the ancillary files that structapps references for them, but I don't think that's relevant to this problem.

So here's the testing app in structapps:

With these definitions, I can open FrameMaker, pick "Other XML" from the welcome screen, pick "Structured applications" > "testing" from the New XML screen, click "OK", and a new document (Untitled1.XML) is opened, containing a document node.

Right. Now let's add a preprocessor step.

Here's the modified structapps:

and this is the stylesheet test.xsl:

With this modification, the New XML procedure above shows a brief hourglass cursor, then does nothing. There are no errors reported.

Just for completeness, I removed the pre-processor step, created a document through New XML and saved it:

then put the pre-processor step back and opened the document I had just saved, showing that the pre-processor runs fine (there is a warning about being unable to validate because there's no path to the DTD in the file, that's because I kept the test.xsl as minimal as possible):

So it's clear where the problem is, but not what it is.

I'll close this post here and pick up in the next one.