Questions about <procedure> and <content>

Aug 28, 2008 at 7:37 PM
I've been using <procedure> as suggested in the examples but I'm confused about what the <content> tag is for. I have something like this:

<procedure>
      <title>Development steps</title>
      <steps class="ordered">
        <step>
          <content>
            <para>Creating a server application</para>
            <para>
              A server application ...
            </para>
          </content>
        </step>
        <step>
        ...

What is the <content> for and are there other things I can do with <step>? Right now I just use <step><content> together and the first <para> becomes my numbered "heading". It would be nice to make the steps collapsible and maybe have a separate title style instead of just numbering the first paragraph.

Thanks,
Andrew
Aug 28, 2008 at 7:55 PM
Hi Andrew, 

The content element is defined as a schema element type that is used by several section-type structural elements, not just procedure elements.  Its purpose, it seems, is to be a container of block-level content and nested structure elements.  It certainly accepts more children than just para elements too.  Here's the relevant schema that describes its content: 

<group name="structureGroup">
 <choice>
  <group ref="maml:blockGroup"/>
  <group ref="maml:structureListGroup"/>
  <element ref="maml:definitionTable"/>
  <element ref="maml:table"/>
  <element ref="maml:procedure"/>
  <group ref="maml:structureMediaGroup"/>
 </choice>
</group>

I think step can also contain other steps, IIRC.  Whether Sandcastle honors them is a different story though ;)

If you're authoring MAML topics using Visual Studio's XML editor, then I recommend reading the following article:

How To Enable IntelliSense in Conceptual Topics
http://www.codeplex.com/DocProject/Wiki/View.aspx?title=How%20To%20Enable%20IntelliSense%20in%20Conceptual%20Topics

Sandcastle's main_conceptual.xsl file provides the XSLT templates that transform MAML to HTML.  If you want a different output for the step element you'll have to update this file or one of the XSLT files that it imports.

- Dave
Aug 28, 2008 at 8:42 PM
Brilliant, thanks for all the info.

I'm using DocProject and I'm writing MAML from within VisualStudio so enabling IntelliSense on MAML was a huge help!

Andrew