Re: [SVG] grid based layout DTD suggestion

<!--
>
>Shouldn't your grid-col be named grid-cell?
>
>eg
>
><!ELEMENT grid  (grid-row*)
><!ELEMENT grid-row  (grid-cell*)>
><!ELEMENT grid-cell  %some_permissive_content_model;>

In this case, no since it's (row,col) not (row,cell).

>
>or
>
><!ELEMENT grid  (grid-row*|grid-col*)
><!ELEMENT grid-row  (grid-cell*)>
><!ELEMENT grid-col  (grid-cell*)>
><!ELEMENT grid-cell  %some_permissive_content_model;>

This is interesting, vertical/horizontal or horizontal/vertical definition.

>2. Why allow rect, but not circle and ellipse?
>
>A grid-cell might share the content model with g, for example.

It should contain all of %SVG.g.content;
I just couldn't compile it properly.


Do you prefer a free ad hoc definition for grids?

<grid>
  <grid-rows><grid-col></grid-col></grid-rows>
</grid>

OR

<grid>
  <grid-cols><grid-row></grid-row></grid-cols>
</grid>

OR

<grid>
  <grid-cell row='1' col='2'></grid-cell>
</grid>
-->

<?xml version='1.0' encoding='iso-8859-1'?>

<!-- FILE: svg-grid5.xml -->
<!DOCTYPE svg [

<!ELEMENT grid      (grid-cell*|grid-rows*|grid-cols*)>
<!ELEMENT grid-rows (grid-col*)>
<!ELEMENT grid-cols (grid-row*)>
<!ELEMENT grid-row  (#PCDATA   )><!-- %SVG.g.content; -->
<!ELEMENT grid-col  (#PCDATA   )><!-- %SVG.g.content; -->
<!ELEMENT grid-cell (#PCDATA   )><!-- %SVG.g.content; -->

<!ATTLIST grid
  x             CDATA   "0"
  y             CDATA   "0"
  rows          CDATA   #IMPLIED
  cols          CDATA   #IMPLIED
  id            CDATA   #IMPLIED
  height        CDATA   #IMPLIED
  width         CDATA   #IMPLIED
  style         CDATA   #IMPLIED
  class         CDATA   #IMPLIED
  shape        (xlink)  #IMPLIED
  onclick       CDATA   #IMPLIED
  ondblclick    CDATA   #IMPLIED
  onmousedown   CDATA   #IMPLIED
  onmouseup     CDATA   #IMPLIED
  onmouseover   CDATA   #IMPLIED
  onmousemove   CDATA   #IMPLIED
  onmouseout    CDATA   #IMPLIED
  onkeypress    CDATA   #IMPLIED
  onkeydown     CDATA   #IMPLIED
  onkeyup       CDATA   #IMPLIED
>
<!ATTLIST grid-cell
  row           CDATA   #REQUIRED
  col           CDATA   #REQUIRED
  height        CDATA   #IMPLIED
  width         CDATA   #IMPLIED
  style         CDATA   #IMPLIED
  class         CDATA   #IMPLIED
  rowspan       CDATA   "1"
  colspan       CDATA   "1"
  shape        (xlink)  #IMPLIED
  onclick       CDATA   #IMPLIED
  ondblclick    CDATA   #IMPLIED
  onmousedown   CDATA   #IMPLIED
  onmouseup     CDATA   #IMPLIED
  onmouseover   CDATA   #IMPLIED
  onmousemove   CDATA   #IMPLIED
  onmouseout    CDATA   #IMPLIED
  onkeypress    CDATA   #IMPLIED
  onkeydown     CDATA   #IMPLIED
  onkeyup       CDATA   #IMPLIED
>

]>

<svg>
<grid>
<grid-cell row='1' col='2'>hello world</grid-cell>
<grid-cell row='1' col='2'>overlapping</grid-cell>
<grid-cell row='2' col='1'>blabla</grid-cell>
</grid>

<grid>
  <grid-rows><grid-col>row then col</grid-col></grid-rows>
</grid>

<grid>
  <grid-cols><grid-row>col then row</grid-row></grid-cols>
</grid>


<grid>
  <grid-cell row='1' col='2'>free form</grid-cell>
</grid>

</svg>


<!--
Any body else as interesting ideas?

Sincerely yours,
Fred.

-->






_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

Received on Wednesday, 30 April 2003 19:03:26 UTC