DITA and XMetaL Discussion
kwag_myers August 25, 2010 at 3:28 pm
Using Sections in a Concept TopicAugust 25, 2010 at 3:28 pmParticipants 0Replies 1Last Activity 11 years, 10 months ago
This isn't really a problem, I'm just curious about this.
With a new Concept Topic you can insert a
element immediately following the closing paragraph tag . However, I have topics that I can't insert a section until after the second or third paragraph.
I've tried using the Element List and manually in Plain Text Mode, which results in an “Invalid tag name…” error.
When you are first authoring the topic, there is no issue. It's when you decide to go back and reorganize a topic into sections that it becomes a problem.
The workaround is easy enough – go to the bottom of the page where section elements are allowed, the cut and paste the content in. I'm just wondering if there is a DITA rule I'm not aware of?Derek Read August 25, 2010 at 6:59 pm
Reply to: Using Sections in a Concept TopicAugust 25, 2010 at 6:59 pm
I would recommend the DITA Language Reference, but it does not get into things at this detail level (ie: which elements can follow others). However, just in case it might help in future you can press Alt+F1 and our help system will bring up the DITA LangRef documentation for the current element.
To answer your question, what you are seeing is a result of this rule in the DITA 1.1 DTDs:
That rule brings in a bunch of other stuff, provided here for a little more context…
[code] %sl; | %pre; | %lines; | %fig; | %image; |
%object; | %table; | %simpletable;”>[/code]
Basically, what this all means is that
may optionally contain
(and a bunch of other things – the “basic.block” stuff), BUT these things must come before
(which are also optional). So, if (as in the default template we ship that you are probably using) already has a
as its first child element you cannot put a
This is also why, when you remove the
you can insert a
as the first element inside
. And it is also why, if you select the entire
(including tags) you can wrap it with
using the Element List as
can also contain
What it comes down to I think, is that you should believe whatever the Element List tells you as long as “Rules Checking” is turned on, which is usually the case in TagsOn and Normal views, but never the case in Plain Text view where you are free to do whatever you like.
If you prefer to always start your concept topics with
then you may wish to create a template for that (ie: one that has
as the first element), or you might wish to create a template that has nothing inside
so you can decide when you open it what the first child of should be.
- You must be logged in to reply to this topic.