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
April 26, 2019

Right. Sorry this is long. I've also used screen captures so I can't use generic names for the files and application any more :-)

I have copied the DTD into the app directory and changed the application definition in structapps.fm so that every file has an absolute path:

(There's no post processor stylesheet in the definition because our post stylesheet crashes Saxon in FrameMaker, although it runs fine invoked in a normal shell. So, for the moment, we save the document as XML and run the post stylesheet separately.)

Changing the DTD to a fixed location has not affected our normal workflow when editing existing XML documents. And I wouldn't expect it to because the XML headers are constructed by our stylesheets.

But this thread is all about trying to create a new document before deciding where to save it. And that's still not quite working.

I start FrameMaker and get the Welcome screen, where I select "Other XML" in the "Create a New Document" pane:

This opens a New XML dialog with four choices in the LH panel: recently used, structured applications, DITA, other XML. I pick Structured applications and the RH panel allows me to pick from all the apps which are defined in structapps.fm. My app is at the bottom of the list:

I click OK and the cursor turns into an hourglass for about a second before reverting. No other windows change, no new document is opened, there is nothing reported in the console. FrameMaker tried to do something but it didn't succeed, and it didn't tell me what went wrong.

Right. Let's try the other route. From the Welcome screen I go File > New > XML. This puts up the same New XML dialog with the same second's brief activity and (lack of) result.

Last option: File > New > Document. Now I see a dialog which allows me to pick a template, so I select the template file defined for my app in structapps.fm:

When I click "New" I do get a new document window; the document is labelled Untitled1.fm, and the element pod shows me the correct elements.

(This wasn't working when the DTD path in the app definition was relative; it reported a problem in the console. Now it's working.)

At this point I can insert content into the document and if, when I save it, I save it as XML in the correct part of the filesystem, it will be valid. I need to run the post-processor stylesheet to remove

<!DOCTYPE document SYSTEM "file:///C:/Program%20Files/Adobe/Adobe%20FrameMaker%202019/structure/xml/helpcenter/app/fmdocs.dtd" [ ]>

and add the xsi namespace and xsi:noNamespaceSchemaLocation="../../hcdocs.xsd" attributes to the document element, but the stylesheet already does that.

So this last method is almost there.

Minor question: given the template is associated with the correct structured app, why couldn't the document be opened as an XML?
Major question: why doesn't the New XML dialog from the welcome screen work? (perhaps that's the same question)

Thanks for reaching the last line of this!

Cheers
T


Trevor,

1.    Thank you for providing more details on your workflow. Once I realized that you were using a preprocess, I was able to duplicate the problem with a simple test case. Other XML does not create a new document when the selected application has a preprocess. No error messages appear in the console. I will file a bug about this problem.

2.    Just because your template has set a structured application does not mean you will never save documents as FM file.

3.    The following observation won't help you create new documents with the .xml extension in the tentative filename. Nevertheless, my own preference is to see the .fm extension. I strongly recommend saving working documents as FM. When you are editing in WYSIWYG view, you are working with an FM document. When you save it as XML, FM uses the XML application to convert the WYSIWYG structure to XML. If the document is invalid, if there are errors in the DTD, r/w rules, or postprocess transform, or even if there is content that is used only within FM, content could be lost in the XML version. Similarly, when you open an XML document, FM uses your application to interpret the XML and create a WYSIWYG document. Any problems with the application can result in lost content. Once the document is complete and the application has been thoroughly tested, you can save it as XML.

4. By the way you can get to the New XML dialog box without going through the welcome screen with File > New > XML or Esc f X.

5. In situations when you do successfully create a new document from the Other XML tile on the welcome screen, FM adds a new tile to the welcome screen for the selected application. This convention saves you from going through New XML to create multiple documents using the same application.

       --Lynne