- From: Don Larson <dlarson@cgmlarson.com>
- Date: Mon, 26 Jan 2009 11:08:14 -0600
- To: Dave Cruikshank <dvdcruikshank@gmail.com>
- cc: CGM Open WebCGM TC <cgmo-webcgm@lists.oasis-open.org>, WebCGM WG <WebCGM WG public-webcgm-wg@w3.org>
Dave,
Thanks for that clarification, it makes sense now.
While we are on subject of DTD. I noticed that there is a "defaultStyleProp"
element in DTD-
<!ELEMENT defaultStyleProp ( lineCap | edgeCap | lineJoin | edgeJoin
| lineTypeCont | edgeTypeCont | mitreLimit
| restrTextType | lineEdgeTypeDef
| hatchStyleDef )+
but at the beginning of the DTD, you have specified-
<!ELEMENT webcgmConfig ( fontMap?, defaultAttributes? )
Is this a typo or am I missing something here?
Don
> Forrest,
> Of course, you're right....I just compounded the error by copying and
> pasting from Don's email. dashLength is inside the content of
> lineEdgeTypeDef
> thx..Dave
> On Mon, Jan 26, 2009 at 7:07 AM, Forrest Carpenter <forrest@sdicgm.com>
> wrote:
>
>
>
> Dave,
>
> In the DTD the dashLength element is defined as:
> <!ELEMENT lineEdgeTypeDef ( dashLength+ )
> <!ATTLIST lineEdgeTypeDef
> lineIndex ( 1 | 2 | 3 | 4 | 5 ) #REQUIRED
> repeatLength CDATA #REQUIRED
> So shouldn't the dashLength be within the lineEdgeTypeDef ?
>
>
>
> <webcgmConfig
> <lineEdgeTypeDef lineIndex="1" repeatLength="100"
> </lineEdgeTypeDef>
> <dashLength>10</dashLength>
> <dashLength>2</dashLength>
> <dashLength>5</dashLength>
> <dashLength>2</dashLength>
> </lineEdgeTypeDef>
> </webcgmConfig>
>
> Regards,
> Forrest
>
>
>
>
> From: David Cruikshank [mailto:dvdcruikshank@gmail.com]
> Sent: Sunday, January 25, 2009 5:27 PM
> To: Andrew Moorhouse; Ben Bezaire; Dieter Weidenbruck; Don Larson; Forrest
> Carpenter; Franck Duluc; Lofton Henderson; Rob Orosx; Stuart Galt
> Subject: Don's question
>
>
> 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 17:08:55 UTC