Re: [SVGMobile12] Question on handling of <script> with xlink:href and child nodes

Quoting Robin Berjon <robin.berjon@expway.fr>:
> The problem that's raised here is that we're trying to define  
> behaviour for all possible languages, and we don't know them all so  
> we're in fuzzy-land. Some might not have any real XML in them (say,  
> only in strings). Some might have some bits of XML (say E4X). Others  
> yet may be all XML. The fact of the matter is that there's a context  
> switch, and the conformance of everything contained within the script 
>  element MUST be defined by something other than the SVG 
> specification.

Well, within XML based-languages you'd only have to define what would 
happen for
XML based-languages inside <script>. (E4X was a wrong example, sorry about
that.) The other type of language you might have inside <script> are
text-based.

For XML based-languages the entire subtree of the <script> element is relevant
and for text-based languages you'd have to define some algorithm. What I
believe is implemented today is that descendent elements are processed first
and when you eventually arrive at the <script> element you take all Text nodes
(ignoring Element, Comment, etc.) together (probably by converting
CDATASections first) and pass them on to the script executer.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>

Received on Friday, 17 February 2006 12:31:23 UTC