Re: <textArea> in 1.2T RNG

On Tue, 12 May 2009 09:12:05 +0200, Cameron McCormack <cam@mcc.id.au> wrote:

> The <textArea> element in the SVG 1.2 Tiny RNG is defined as:
>
>   <element name='textArea'>
>     <ref name='textArea.AT'/>
>     <zeroOrMore>
>       <choice>
>         <element name='tspan'>
>           <ref name='tspan.AT'/>
>           <zeroOrMore>
>             <choice>
>               <ref name='tbreak'/>
>               <ref name='svg.TextCommon.group'/>
>             </choice>
>           </zeroOrMore>
>         </element>
>         <ref name='svg.TextCommon.group'/>
>       </choice>
>     </zeroOrMore>
>   </element>
>
> AFAICT, since svg.TextCommon.group does not allow a <tbreak> in it, this
> disallows content such as:
>
>   <textArea>
>     <tbreak/>
>   </textArea>

That RNG looks broken indeed. Add another group that includes 'tbreak', or just add <ref name='tbreak'/> to the outermost <choice> element?

> and:
>
>   <textArea>
>     <tspan>
>       <tspan><tbreak></tspan>
>     </tspan>
>   </textArea>
>
> both of which are used by tests in the test suite.

I wonder if RNG can express the situation in this case, for tspan we want to allow any elements that the tspan's parent allows (as is stated in the elements table, which unfortunately is just informative). I think we might have to add wording to the <tspan> element definition.

How does the <choice> work in the RNG when we have "svg.TextCommon.group" that includes "tspan" and we have another instance of an element with name="tspan"?

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed

Received on Tuesday, 12 May 2009 07:42:07 UTC