SVG DTD -- merging ideas for line element into one element

Dear Sirs,

I realize it is almost certainly too late to suggest new attributes and/or 
elements for the SVG language.  However, I find myself wanting to add a few 
attributes and elements for my own purposes anyway... and unskilled in 
figuring out how to do so safely.

I have reviewed the tutorials at zvon.org, particularly the DTD tutorial at 
http://www.zvon.org/xxl/DTDTutorial/General/book.html .  It's an 
exceptionally well-written simple tutorial, but does not cover conditions in 
DTDs -- a factor I have to consider.

At the end of this e-mail, I'm including four separate definitions for the 
line element in SVG -- the original, a slight amendment including an 
endpoints attribute, a version for handling point-slope lines, and a version 
for handling slope-intercept lines.  (I hope at least that I've expressed 
the definitions correctly.  SVG is my first exposure to XML.)

I'm keenly interested in learning how to meld these four different 
definitions into one, or at least including an internal DTD/XSL stylesheet 
to modify the current definition, as mentioned in section 23.5 of the SVG 
Candidate Recommendation.

Section 23.5 is somewhat confusing in one aspect -- it mentions "the entity 
viewExt" in the text, and then in the following code excerpt, it mentions 
"<!ENTITY % extView..."  I don't see how these two object names are related 
-- is this a typo?

Would you be willing to assist me briefly in putting the pieces together for 
a line element definition incorporating the four versions into one?  The 
experience for me would be invaluable.

Alex Vincent
San Francisco, CA

<!-- original definition of line -->

<!ENTITY % lineExt "" >
<!ELEMENT line 
(%descTitleMetadata;,(animate|set|animateMotion|animateColor|animateTransform
                %geExt;%lineExt;)*) >
<!ATTLIST line
  %stdAttrs;
  %testAttrs;
  %langSpaceAttrs;
  externalResourcesRequired %Boolean; #IMPLIED
  class %ClassList; #IMPLIED
  style %StyleSheet; #IMPLIED
  %PresentationAttributes-FillStroke;
  %PresentationAttributes-Graphics;
  %PresentationAttributes-Markers;
  transform %TransformList; #IMPLIED
  %graphicsElementEvents;
  x1 %Coordinate; #IMPLIED
  y1 %Coordinate; #IMPLIED
  x2 %Coordinate; #IMPLIED
  y2 %Coordinate; #IMPLIED >

<!-- alternate definition one:  adding endpoints attribute
	endpoints defaults to "both", indicating line segment
	pt1 indicates the (x1,y1) point is an endpoint, but the (x2,y2) point is 
not:  a ray
	pt2 indicates the (x2,y2) point is an endpoint, but the (x1,y1) point is 
not:  a ray
	none indicates no endpoints:  a geometric line, continuing through the two 
points. -->

<!ENTITY % lineExt "" >
<!ELEMENT line 
(%descTitleMetadata;,(animate|set|animateMotion|animateColor|animateTransform
                %geExt;%lineExt;)*) >
<!ATTLIST line
  %stdAttrs;
  %testAttrs;
  %langSpaceAttrs;
  externalResourcesRequired %Boolean; #IMPLIED
  class %ClassList; #IMPLIED
  style %StyleSheet; #IMPLIED
  %PresentationAttributes-FillStroke;
  %PresentationAttributes-Graphics;
  %PresentationAttributes-Markers;
  transform %TransformList; #IMPLIED
  %graphicsElementEvents;
  x1 %Coordinate; #IMPLIED
  y1 %Coordinate; #IMPLIED
  x2 %Coordinate; #IMPLIED
  y2 %Coordinate; #IMPLIED
  endpoints (both|pt1|pt2|none) "both" #IMPLIED >

<!-- alternate definition two:  point-slope
	indicates a geometric line with no endpoints, passing through (x1,y1) and 
(x1 + 1, y1 + slope)

y = y0 + slope(x - x0)
y2 = y1 + slope(x2 - x1)
(x1, y1)  (x2, y1 + slope(x2 - x1))

x2 = x1 + 1

(x1, y1)  (x1 + 1, y1 + slope(x1 + 1 - x1))
(x1, y1)  (x1 + 1, y1 + slope(1))
(x1, y1)  (x1 + 1, y1 + slope)

	-->

<!ENTITY % lineExt "" >
<!ELEMENT line 
(%descTitleMetadata;,(animate|set|animateMotion|animateColor|animateTransform
                %geExt;%lineExt;)*) >
<!ATTLIST line
  %stdAttrs;
  %testAttrs;
  %langSpaceAttrs;
  externalResourcesRequired %Boolean; #IMPLIED
  class %ClassList; #IMPLIED
  style %StyleSheet; #IMPLIED
  %PresentationAttributes-FillStroke;
  %PresentationAttributes-Graphics;
  %PresentationAttributes-Markers;
  transform %TransformList; #IMPLIED
  %graphicsElementEvents;
  x1 %Coordinate; #IMPLIED
  y1 %Coordinate; #IMPLIED
  slope %Number; #IMPLIED
  linetype (point-slope) #REQUIRED >

<!-- alternate definition three:  slope-intercept
	indicates a geometric line with no endpoints through (0, y-intercept) and 
(1, y-intercept + slope) -->

<!ENTITY % lineExt "" >
<!ELEMENT line 
(%descTitleMetadata;,(animate|set|animateMotion|animateColor|animateTransform
                %geExt;%lineExt;)*) >
<!ATTLIST line
  %stdAttrs;
  %testAttrs;
  %langSpaceAttrs;
  externalResourcesRequired %Boolean; #IMPLIED
  class %ClassList; #IMPLIED
  style %StyleSheet; #IMPLIED
  %PresentationAttributes-FillStroke;
  %PresentationAttributes-Graphics;
  %PresentationAttributes-Markers;
  transform %TransformList; #IMPLIED
  %graphicsElementEvents;
  y-intercept %Coordinate; #IMPLIED
  slope %Number; #IMPLIED
  linetype (slope-intercept) #REQUIRED >

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.

Received on Sunday, 27 August 2000 16:53:56 UTC