W3C home > Mailing lists > Public > public-webcgm-wg@w3.org > January 2009

Don's question

From: by way of Lofton Henderson <dvdcruikshank@gmail.com>
Date: Sun, 25 Jan 2009 17:12:51 -0700
Message-Id: <5.1.0.14.2.20090125171204.03dfce88@localhost>
To: WebCGM WG <public-webcgm-wg@w3.org>
[...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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 26 January 2009 00:14:16 GMT