[x3d-public] dual use of script tag in HTML environment

Andreas Plesch andreasplesch at gmail.com
Fri Nov 11 17:41:46 PST 2016

On Nov 11, 2016 5:02 PM, "Yves Piguet" <yves.piguet at gmail.com> wrote:
> On 11 Nov 2016, at 20:40, Andreas Plesch <andreasplesch at gmail.com> wrote:
>> On 11 Nov 2016, at 20:40, Andreas Plesch <andreasplesch at gmail.com> wrote:
>> On Fri, Nov 11, 2016 at 1:27 PM, Yves Piguet <yves.piguet at gmail.com
> wrote:
>>> Sorry if this has already been discussed. Couldn't you define a
namespace-like prefix for all elements, such as "x3d:"? Maybe optional for
elements which don't cause a compatibility problem with element tag names
already defined for other purposes.
>> Yes, that would be a solution and html5 custom elements need to have
such prefix with a minus instead of a colon. But since script is the only
element which is affected, there is a desire to avoid that in order to stay
x3d spec. conforming.
> But it wouldn't be a custom element, so one shouldn't have a hyphen in a
standard x3d tag. Or if you consider x3d in html5 as a custom application,
you must have hyphens everywhere.

It is considered in the html5 environment. I was thinking about Custom
Elements as in Web Components. You are right hyphens would be required

>>> In HTML5, namespaces don't exist (see e.g. <
https://dev.w3.org/html5/spec-LC/syntax.html#elements-0>): the actual tag
name of X3D script elements would be "x3d:script". Script source code
should be put in cdata fragments <
>> No,  in html5 CDATA sections are only used in 'foreign content', see
https://dev.w3.org/html5/spec-LC/syntax.html#cdata-sections :
>> 3. CDATA sections can only be used in foreign content (MathML or SVG)
>> and <script> is considered raw text content.
> I mean it would be foreign content if x3d's script element is made
distinct with a different name, wouldn't it? Then you can keep child
elements for fields.

It would not be foreign content in the spec. sense but <x3dscript> would be
left alone by the web browser and would be able to have child elements,

>> In xhtml, one should use CDATA for script source code.
>>> In XHTML, a valid xml namespace would be declared and used.
>> For xhtml, there is no problem if the type attribute of the script node
is for example 'application/vrmlscript' .
>> What do you think about the fields attribute proposal for x3d scripts
nodes ?
> I don't have much experience with the xml encoding. In principle I'd
rather keep everything as close to v3 as possible.

Ok. Thanks.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20161111/2501ff49/attachment.html>

More information about the x3d-public mailing list