Re: Third release of Constraint SVG browser

On Thu 2004-02-26 Robin Berjon wrote: 
> Tobias Reif wrote:
> >On Fri 2004-02-27 Cameron McCormack wrote:
> >>     <circle id="c" cx="100" cy="100" r="50"/>
> >>     <rect width="100" height="100">
> >>       <c:constraint attributeName="x" value="id('c')/@cx"/>
> >>       <c:constraint attributeName="y" value="id('c')/@cy"/>
> >>     </rect>
> >
> >Is this valid? Do the SVG specs allow any elements from non-SVG
> >namespaces as content of rect? I didn't check the specs, and I
> >think the above makes sense, I'm just curious on what text you base
> >your assertion that the above is "standard SVG".
> 
> It is and has always been.

According to which portion of which spec?

> Content in foreign namespaces is welcome pretty much everywhere.

Since this is not generally true for all XML languages [1]; where do
which (SVG) specs allow it?

I'm just curious where and how they allow it, that's why I asked for
references or quotes.

I should check the specs myself, but in case they don't contain text
explicitly allowing content from other namespaces "pretty much
everywhere" then it would have to be added if this should be allowed
(which is as I said sensible IMHO, from a certain POV).

The freedom to add foreign content "anywhere" would also have to be
expressed in the schemas.

For

<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
  xmlns:c="http://example.org/foo">
  <ellipse cx="50" cy="30" rx="20" ry="10"/>
<rect width="100" height="100">
  <c:constraint attributeName="x" value="id('c')/@cx"/>
  <c:constraint attributeName="y" value="id('c')/@cy"/>
</rect>
</svg>

I get

[xval] validating /tmp/xval_input.3476 against
/home/tobi/bulk/xml/schemas/svg/1_1/rng/svg11.rng
[xval] jing:
/tmp/xval_input.3476:6:56: error: element "constraint" from namespace "http://example.org/foo" not allowed in this context
/tmp/xval_input.3476:7:56: error: element "constraint" from namespace "http://example.org/foo" not allowed in this context
[xval] xmllint:
/tmp/xval_input.3476:6: element constraint: Relax-NG validity error : Expecting element desc, got constraint
/tmp/xval_input.3476:6: element constraint: Relax-NG validity error : Element rect has extra content: constraint
/tmp/xval_input.3476:5: element rect: Relax-NG validity error : Expecting element circle, got rect
/tmp/xval_input.3476:4: element ellipse: Relax-NG validity error : Element svg has extra content: ellipse
/tmp/xval_input.3476 fails to validate

The schema is used in the above example is the non-normative RNG
http://www.w3.org/Graphics/SVG/1.1/rng/

Tobi

[1]
Generally content from foreign namespaces must be allowed explicitly
otherwise it's not allowed / invalid / not in conformance with the
respective standard. Content from foreign namespaces is not
"invisible", if it's included in violation of a spec then processing
can break.

-- 
Vim users, don't forget to
   http://iccf-holland.org/donate.html

Received on Thursday, 26 February 2004 13:11:19 UTC