Skip to main content
Legend
December 19, 2013
Question

how to handle DITA <ph> xrefs

  • December 19, 2013
  • 1 reply
  • 584 views

Something amazing has happened. After countless attempts to get a toehold on the glassy wall of structured Frame, I've suddenly managed to run up it as far as writing my first EDD – it works, it handles tables, I've successfully tried both ParagraphFormatting and ElementPgfFormatTag, and I still understood it the next day.

So now I'm happily experimenting with some very simple DITA files, prepared and validated elsewhere. I used a <ph conref="_ymvProductVariable.dita#terminal/product"/> construct in my DITA file to replicate the behaviour of a FrameMaker user variable. Opening the DITA file in FM and applying my EDD highlights the <ph> as an invalid element, which I can accept.

Question – to which I may not understand the answer, but I'll try: how do I define the <ph> element, so I can include it in a General rule like (<TEXT> | ph)+ and have it show the value of the variable?

My apologies for trying to run before I can walk, but after years feeling my feet were nailed to the ground it's irresistible.

This topic has been closed for replies.

1 reply

ScottPrentice
Inspiring
December 19, 2013

Hi Niels...

It sounds like you need to create a ph element definition in your EDD. If you have defined a ph element, you can add it to your general rule. To create an element definition in your EDD, just insert an <Element> node in your EDD. You should see other nodes like this .. you just need one for the ph element. You'll also need to add attribute definitions to that element definition.

The best thing for you to do is to look at the DITA structure applications that ship with FrameMaker. If I may be so bold to ask .. why are you creating a DITA structure application when those are provided for you? If you want to create a custom DITA app, you should start with a default app and modify it, but there's seldom reason to start from scratch in creating a DITA app.

A note of warning .. the DITA 1.2 apps are horribly complex to understand. They were created to mirror the way the DITA DTDs are structured which is a series of nested/referenced MOD and ENT files. The EDDs provided by Adobe use text insets to emulate this structure. While technically, an interesting and possibly sensible idea, it's a mess when you're trying to customize. If you're just trying to do some basic DITA work, you're better off using the DITA 1.1 apps in which each EDD is completely self contained and much easier to work with. The only problem with the default DITA 1.1 apps is that there is one per topic type, which means that you have to make duplicate edits in each topic type you plan on working with.

There's no reason that you can't have one structure application that supposts all (well, most) of the topic types. This is what DITA-FMx does. Even if you don't want to use DITA-FMx for authoring and publishing DITA in Frame, you might want to download the trial and take a look at the EDD.

     http://leximation.com/dita-fmx/

I hope this helps.

Cheers,

...scott

Scott Prentice

Leximation, Inc.

www.leximation.com

Legend
December 30, 2013

Thanks, Scott – I'll take a look at your various suggestions: so far I do have a <ph> element defined, but it's displaying as a paragraph in its own right rather than an inline cross-reference. I can see I need to learn a bit more about how cross-references work in the two environments.

My reason for writing my own DITA structure app is just to help me learn! The content I've so far converted into DITA 1.2 is a) typical of the sort of information I need to publish; b) not especially complex, so I thought I'd take a set of robust, validated DITA files and take them as a starting-point for getting to grips with EDD.

As for DITA-FMx, which I've heard so many good things about, I'm afraid it's a non-starter thanks to my being the only FM user in the company: my predecessor – thank goodness – fought to get FM, but there's no chance of getting Admin rights/installing anything extra :-{

N