HTML to MAML Converter inserts table containing filename at top of converted file -- possible to override?

Topics: User Forum
Mar 11, 2011 at 5:53 PM

I notice that the HTML to MAML converter inserts the following text immediately following the <introduction></introduction> element:

<table>
<row>
<entry>Search.SearchMax.Theory.SearchMax</entry>
</row>
</table>

where the  <entry> element contains the base name of the converted file. 

Is there any way to suppress or alter this behavior? 

Thanks,
Ed

 

Mar 11, 2011 at 7:14 PM

And a pair of related questions:

  • How can one control the <title> element of the HTML that is emitted by sandcastle. It seems to get set to the filename.
  • The converter seems to ignore the <title> element in the input HTML file. It would be nice if it did something useful with this string (see previous bullet).

Thanks again!

Ed

Coordinator
Mar 11, 2011 at 7:44 PM

Regarding the table entry, the converter just parses the HTML and generates the equivalent MAML.  If you've got a table in the topic, it'll generate that same table in the MAML.  It's a generic converter so it doesn't look for any particular structure.  It just takes what it's given and generates the closest equivalent in MAML.  The titles are stored in the content layout file.  One is generated for the converted content.  Assuming it found them, the titles will be in there.

Eric

 

Mar 11, 2011 at 9:46 PM
Edited Mar 11, 2011 at 9:47 PM

Thanks -- I was missing that bit of the input HTML.

With regard to the title, what I'm wondering is (a) why the value of the <title> element in the input HTML file doesn't get included in the converted MAML file and (b) how I can control the title of the generated HTML file:

Input HTML file (named Acquisition.General.CodeWalkthrough.ChangeAcqFifoProps.html):

<html xmlns:cogdoc="http://www.cognex.com/cogdoc">
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-16">
<link rel="stylesheet" type="text/css" href="msdn.css">
<title>Changing Acquisition Tool Properties</title>
</head>

Generated MAML file:

<?xml version="1.0" encoding="utf-8"?>
<topic id="c728484d-5a5c-48f8-a2bc-1d6b8e779ecd" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>TODO: Move introduction text here</para>
</introduction>
<para>... converted text.... </para>
<section>
<!--h1-->
<title>
<!-- TODO: Add named anchor: #using_a_toollevel_cogacqfifotool -->Using a Tool-Level CogAcqFifoTool
</title>

Sandcastle-generated HTML file:

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:MSHelp="http://msdn.microsoft.com/mshelp" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"/>
<META NAME="save" CONTENT="history"/>
<title>Acquisition.General.CodeWalkthrough.ChangeAcqFifoProps</title>
<meta name="Language" content="en-us"/> <meta name="Microsoft.Help.Id" content="91182143-5f43-4ae2-a3b8-d3f5e2cbb956"/>
<meta name="Description" content="TODO: Move introduction text here"/>
<meta name="Microsoft.Help.ContentType" content="Concepts"/>
<link rel="stylesheet" type="text/css" href="../styles/Presentation.css"/>
<link rel="stylesheet" type="text/css" href="ms-help://Hx/HxRuntime/HxLink.css"/>
<script type="text/javascript" src="../scripts/EventUtilities.js"/>
<script type="text/javascript" src="../scripts/SplitScreen.js"/>
<script type="text/javascript" src="../scripts/Dropdown.js"/>
<script type="text/javascript" src="../scripts/script_manifold.js"/>
<script type="text/javascript" src="../scripts/script_feedBack.js"/>
<script type="text/javascript" src="../scripts/CheckboxMenu.js"/>
<script type="text/javascript" src="../scripts/CommonUtilities.js"/>
<xml>
<MSHelp:Keyword Index="A" Term="91182143-5f43-4ae2-a3b8-d3f5e2cbb956"/>
<MSHelp:Attr Name="RevisionNumber" Value="1"/>
<MSHelp:Attr Name="AssetID" Value="91182143-5f43-4ae2-a3b8-d3f5e2cbb956"/>
<MSHelp:Attr Name="Abstract" Value="TODO: Move introduction text here"/>
<MSHelp:Attr Name="TopicType" Value="kbArticle"/>
<MSHelp:Attr Name="Locale" Value="en-us"/>
</xml>
<link type="text/css" rel="stylesheet" href="../styles/highlight.css"/>
<script type="text/javascript" src="../scripts/highlight.js"/>
</head>

Coordinator
Mar 12, 2011 at 8:00 PM

The title of MAML topics is not stored in the topic file itself.  Only section titles appear in them.  The title of the file is stored separately in a companion file along with keywords and other info used for the build.  SHFB doesn't use companion files.  Instead, it stores everything in a content layout file which it uses to arrang the table of content and generate the companion files at build time.  If no title is defined in the content layout file, SHFB will use the name of the topic file as the default title.

Eric