Don's question

[...redirected to TC list by Lofton...]

I can't respond to the TC email list, so I'm sending my response this way.

Don asked about the content model for the aci:



I'm directing this question to you since you created the ACI DTD
and perhaps could shed some light on this and at the same time

confirm my XML coding.

dashLength is defined as an Element rather than as an Attribute of
lineEdgeTypeDef, thus an example the the XML encoding I believe
would be-

<webcgmConfig
     <lineEdgeTypeDef lineIndex="1" repeatLength="100"

     </lineEdgeTypeDef>
     <dashLength>"10 2 5 2"</dashLength>
</webcgmConfig>


However it seems more natural for dashLength to be an Attribute and
coded like this:


<webcgmConfig
     <lineEdgeTypeDef lineIndex="1" repeatLength="100"
      dashLength="10 2 5 2"
     </lineEdgeTypeDef>
</webcgmConfig>

This also applies to the directionVectors and gapWidth Elements

assocaited with the hatchStyleDef.



My response:

When things are repeatable, I've tended to make them repeating elements as 
opposed to attributes.  I think the correct encoding for your example is:


<webcgmConfig
   <lineEdgeTypeDef lineIndex="1" repeatLength="100"
   </lineEdgeTypeDef>
   <dashLength>10</dashLength>
    <dashLength>2</dashLength>
    <dashLength>5</dashLength>
    <dashLength>2</dashLength>
</webcgmConfig>

Remember dashLength is specified as "dashLength+".  That way no parsing is 
required to figure out the values.

If people want parse, it's ok but this was an attempt to simplify the work.


Dave

Received on Monday, 26 January 2009 00:14:15 UTC