Skip to main content
Known Participant
May 13, 2013
Answered

Creating drop-down list for <prodname> element in <metadata> causes errors

  • May 13, 2013
  • 1 reply
  • 1578 views

Frame 11

DITA 1.2

Due to restrictions beyond our control, we must use absurdly long product names. Therefore I want to use drop-down lists to make it easier for the authors to select a <prodname> in the metadata.

What I did:

1. In metaDecl.eddmod.fm, I created a new attribute and named it prod.

    a. I made it the Choice, and Required.

    b. The Choices currently are just Internal and RTVI for testing purposes. I'll put the absurdly long ones in when I have it working.

    c. I have a Prefix rule of: In all contexts Prefix: Product Name: <$attribute[prod]>

2. I imported metaDecl.eddmod.fm to all of these EDDs:

    In the base EDD  folder:

  • basemap.edd.fm
  • basetopic.edd.fm
  • map.eddmod.fm
  • topic.eddmod.fm

   In the technicalContent EDD folder:

  • concept.edd.fm
  • ditabase.edd.fm
  • generalTask.edd.fm
  • glossentry.edd.fm
  • glossgroup.edd.fm
  • reference.edd.fm
  • task.edd.fm
  • topic.edd.fm

3. I imported the element definitions into all of the following:

  • ChapterOutputTpl.fm
  • basemap.template.fm
  • basetopic.template.fm
  • basetopic.template.fm
  • topic.template.fm
  • generalTask.template.fm
  • glossentry.template.fm
  • glossgroup.template.fm
  • map.template.fm
  • ditabase.template.fm
  • reference.template.fm
  • concept.template.fm
  • task.template.fm

4. I imported the elememted definitions from task.template.fm into my test document (yes, it is a task topic).

What happened:

I get the following error message in the console:

XML Parser Messages (Document Instance)

Error at file H:\DITA_Westminster\Procedures - Our DITA\Inserting_Product_Names_Versions_In_Metadata\InsertingProductNamesAndVersionsInMetadata.dita.82F, line 28, char 49, Message: Attribute 'prod' is not declared for element 'prodname'

Error at line 28, char 71, Message: Not enough elements to match content model  '(prodname,vrmlist,((brand|component|featnum|platform|prognum|series))*)'

What I did next:

1. I removed all elements from the general rule of <prodinfo> with the exception of <prodname>. <prodinfo) is the one that had prodname, vrmlist, (brand|component|featnum|platform|prognum|series) in the general rule. I also did a thorough search to ensure that no other element had this same list of element in the general rule. I couldn't find any.

2. I did the import to the EDDs and templates thing again.

3. I got the same error message again. <sigh />

Question:

Why am I still getting those 2 error messages? They are driving me crazy.

Marsha

This topic has been closed for replies.
Correct answer Matt-Tech Comm Tools

The EDD contains structure rules likely derived from the DTD, but is a separate file used by the Structured Application.

You should be able to see the location of your DTD in the StructApps file. Use Structure Tools > Edit Structured Application File to open it from the FM menu.

1 reply

Inspiring
May 14, 2013

Hello Marsha,

I think you will have to adapt the DTD as well (guess that's where the XML parser error comes from).

To do so, you'll need to add the attribute "prod (<productname1>|<productname2>|<productnamex>) #IMPLIED" to the ATTLIST of the prodname element.

Example:

<!ELEMENT prodname  EMPTY>

<!ATTLIST prodname

                                       prod    (Book|Candle|Cookie)   #IMPLIED

>

good luck,

Alex

Known Participant
May 14, 2013

Thanks, Alex.

That makes sense, but where do I find the DTD? I thought the EDD included the DTD.

Marsha

Matt-Tech Comm Tools
Community Expert
Matt-Tech Comm ToolsCommunity ExpertCorrect answer
Community Expert
May 14, 2013

The EDD contains structure rules likely derived from the DTD, but is a separate file used by the Structured Application.

You should be able to see the location of your DTD in the StructApps file. Use Structure Tools > Edit Structured Application File to open it from the FM menu.

-Matt Sullivan, FrameMaker Course Creator, Author, Trainer, Consultant