Skip to main content
Participating Frequently
Oct 24, 2009 11:46 AM UTC
Question

EDD: How to create XML tag that can only accept value from an enumerated list

Hi,

  I'm new to creating EDD and Structured Apps in FrameMaker (9.0).

  I have seen examples of creating EDD that allow an attribute to take on a value from a list.

  But is it possible to have an element accept a value from a list? If so, how?

Thanks,

Anupam.

This topic is closed to new replies. Start a new post to keep the conversation going.

7 replies

Participating Frequently
Oct 26, 2009 8:10 AM UTC

It is not possible!

Translate
Ian Proudfoot
Legend
Oct 26, 2009 12:01 PM UTC

While enumerated lists are not available for element content, FrameMaker 9 does have a new, undocumented feature that allows element content to be restricted to a numeric value.

In an element definition for a Container element you can add the Type element that can contain either Real or Integer elements. I've already found it very useful for restricting data entry because invalid values instantly show up red in the structure view.

It's a sign that some schema related features are becoming available. Let's hope for more schema features in a future release.

Regards

Ian

Translate
Inspiring
Oct 26, 2009 12:51 PM UTC

The EDD enhancement mentioned by Ian was published in March in Adobe’s Technical Communication blog

http://blogs.adobe.com/techcomm/2009/03/structure_view_enhancement_in_framemaker_9_1.html

Translate
Inspiring
Oct 24, 2009 3:39 PM UTC

Hi Anupam, and welcome to forum!

in XML, attributes have names and values. Elements have only name and internal strcucture. This structure can consist of elements or text (CDATA) or both of the element can be empty. These structures (and elements ana attributes) are defined in the EDD.

So an element does not have "values", it can have attributes and it can contain internal structure defined by the DTD (Document Type Definition) or by an XML Schema. Their counterpart in framemaker is EDD.

Hope this helps,

Martti

Translate
Participating Frequently
Oct 24, 2009 4:47 PM UTC

Hi Martti,

  Thanks for your response. I'm trying to write the equivalent of the following XSD in EDD:

  :

   <xs:element name="sw" type="accessTypeSW" minOccurs="1" maxOccurs="1">

  :

   <xs:simpleType name="accessTypeSW">
        <xs:restriction base="xs:string">
            <xs:enumeration value="ro"></xs:enumeration>
            <xs:enumeration value="wo"></xs:enumeration>

         </...>

  </...>

The "sw" element can take one of the enumerated value ... 'ro', 'wo' etc.

I wonder if its possible and how to do it.

Thanks,

Anupam.

Translate
Inspiring
Oct 26, 2009 7:18 AM UTC

Hi Anupam,

Now I understand what you were trying to do..;)

To my knowledge, this cannot be done in EDD, it does not support restrictions for text (CDATA). EDD is a derivate from DTD age and DTD's don't support it either.

Martti

Translate