DTD parse errors

Lynne A. Price lprice at txstruct.com
Tue Nov 28 12:14:41 PST 2006


Steve,
   While other forms are permitted in SGML (and in a FrameMaker EDD), XML 
restricts the use of #PCDATA to content models of the form:

    (#PCDATA | elt1 | elt2 | ...)*

or the simple form:

    (#PCDATA)

Your expression:

     ChapterNumber, <TEXT>

corresponds to:

     ChapterNumber, #PCDATA

does not meet this restriction. You can change your general rule in 
FrameMaker to:

    (<TEXT> | ChapterNumber)*

This rule will accept all sequences consisting of a ChapterNumber followed 
by text, but will also accept other data that you probably do not want 
(such as two ChapterNumbers or text folowed by a ChapterNumber). You can 
use conditional text to use the original expression when you import element 
definitions from an EDD into a structured document or template and the 
above form when you create a DTD. The conditional approach means that 
validating your structured document will confirm that the content meets the 
model you really want even though XML validation will accept undesirable 
variations.

         --Lynne


At 11:31 AM 11/28/2006, Steve Rickaby wrote:
>Struggling with a structured app here...
>
>I have tried to pare everything down to the minimum. The element definition;
>
>Element (Container): TableofContents
>General rule:   ChapterNumber, <TEXT>
>Valid as the highest-level element.
>Automatic insertions
>Automatically insert child:     ChapterNumber
>
>in the EDD translates to:
>
><!ELEMENT TableofContents
>                      (ChapterNumber, #PCDATA) >
>
>in the DTD.
>
>Having set up a structured app, when saving a valid file to XML (which 
>does not in fact contain this element), the XML parser errors on the '#' 
>character of '#PCDATA', saying 'Expected an element name'.
>
>Lots of other errors follow, but the first is maybe the most significant.
>
>What am I doing wrong? My reading of the struct app dev guide is that 
><TEXT> elements are converted to #PCDATA on export to XML.
>
>--
>Steve
>_______________________________________________
>
>
>You are currently subscribed to Framers as lprice at txstruct.com.
>
>Send list messages to framers at lists.frameusers.com.
>
>To unsubscribe send a blank email to
>framers-unsubscribe at lists.frameusers.com
>or visit 
>http://lists.frameusers.com/mailman/options/framers/lprice%40txstruct.com
>
>Send administrative questions to listadmin at frameusers.com. Visit
>http://www.frameusers.com/ for more resources and info.


Lynne A. Price
Text Structure Consulting, Inc.
Specializing in structured FrameMaker consulting, application development, 
and training
lprice at txstruct.com            http://www.txstruct.com
voice/fax: (510) 583-1505      cell phone: (510) 421-2284 





More information about the framers mailing list