[x3d-public] X3D-Edit 4.0, V4. Support of xmlns attribute, x3d namespace

Don Brutzman brutzman at nps.edu
Thu Mar 10 10:28:55 PST 2016


We discussed this today.

Another important reference:

6.2 Namespace Defaulting
https://www.w3.org/TR/xml-names/#defaulting

It appears that xmlns="someURI" is legal in any XML.

We therefore should likely follow your suggestion John to add the following to X3D schema and associated tools:

	xmlns="http://www.web3d.org/specifications/x3d"

This would be version independent... the X3D version attribute is how you specify that, along with compatible DTD and X3D Schema references.

Example, where middle line inserts xmlns:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "http://www.web3d.org/specifications/x3d-3.3.dtd">
<X3D profile='Immersive' version='3.3'
  xmlns="http://www.web3d.org/specifications/x3d"
  xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance'
  xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.3.xsd'>

"How we currently do it" remains documented at

	X3D Scene Authoring Hints: Validation of X3D Scenes using DTD and XML Schema
	http://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Validation

We will look closely at XML specifications before adding this... all comments welcome.


On 3/6/2016 9:57 PM, Don Brutzman wrote:
> Apologies for late response, hadn't seen this earlier.  Thanks for bringing this up, it is important.
>
> On 3/2/2016 7:55 AM, John Carlson wrote:
>> I note that X3D-Edit does not support the xmlns attribute fairly well, so documents coming out of XMLSerializer in Chrome and perhaps other browsers will be seriously broken.  Also the X3D to JSON stylesheet seems to croak with no output.  Here’s an example scene out of an XML Serializer.  Please support xmlns.  If I’ve got the wrong namespace, let me know.  There appear to be many options.
>>
>> Thanks!
>>
>> John
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "http://www.web3d.org/specifications/x3d-3.3.dtd">
>> <X3D xmlns="http://www.web3d.org/specifications/x3d-namespace" profile="Immersive" version="3.3" xsd:noNamespaceSchemaLocation="http://www.web3d.org/specifications/x3d-3.3.xsd" id="x3dele" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance"><head/>
> [...]
>
> Are you thinking of <x3d:X3D/> elements within an XHTML document that has no namespaces for html elements?
>
> The Scene Authoring Hints document the namespace configuration that is used in all of the examples.
>
> =================================================
> Validation of X3D Scenes using DTD and XML Schema
> http://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#Validation
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN"
>                       "http://www.web3d.org/specifications/x3d-3.3.dtd">
> <X3D profile="Immersive" version="3.3"
>    xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance"
>     xsd:noNamespaceSchemaLocation="http://www.web3d.org/specifications/x3d-3.3.xsd">
> =================================================
>
> If I recall correctly, the combined definition of those last 2 attributes is what formally legitimized a no-namespace X3D document.
>
> Besides XML Schema, it looks like the other defining W3C reference is
>
>      Namespaces in XML 1.0 (Third Edition)
>      https://www.w3.org/TR/xml-names/
>
> There was a little work on this topic 6 years ago.  We reserved a namespace uri for X3D that matches the following url.  There is some documentation and links at that location. If it helps, you can use that value with reasonable assurance of stability.  Presumably it is also appropriate for use with X3D v3 series.
>
> http://www.web3d.org/specifications/x3d
> ===============================================
> | This is a placeholder page pointing to discussions on possible changes to the X3D namespace.
> |
> | Suggested future common namespace for X3D, if versioning and other issues are addressed:
> |
> |         http://www.web3d.org/specifications/x3d
> |
> | References:
> |
> |     HTML5 Recommendation Additions for X3D: Change to HTML5 section 9.3 Namespaces
> |     http://www.web3d.org/x3d/content/html5/HTML5RecommendationAdditionsForX3D.html#issue-q
> |
> |     x3d-public at web3d.org mailing list thread
> |     http://web3d.org/pipermail/x3d-public_web3d.org/2010-January/000580.html
> |
> | Questions about this page may be directed to the x3d-public_web3d.org mailing list or brutzman at nps.edu
> ===============================================
>
> This namespace uri was proposed during the era when HTML5 draft was considering X3D and other namespaces for integration.  A variety of changes occurred to the HTML5 draft in subsequent years.
>
> The approved HTML5 section is now found at
>
> https://www.w3.org/TR/html5/infrastructure.html#namespaces
> ===============================================
> | 2.8 Namespaces
> |
> | The HTML namespace is: http://www.w3.org/1999/xhtml
> |
> | The MathML namespace is: http://www.w3.org/1998/Math/MathML
> |
> | The SVG namespace is: http://www.w3.org/2000/svg
> |
> | The XLink namespace is: http://www.w3.org/1999/xlink
> |
> | The XML namespace is: http://www.w3.org/XML/1998/namespace
> |
> | The XMLNS namespace is: http://www.w3.org/2000/xmlns/
> |
> | Data mining tools and other user agents that perform operations on content without running scripts, evaluating CSS or XPath expressions, or otherwise exposing the resulting DOM to arbitrary content, may "support namespaces" by just asserting that their DOM node analogues are in certain namespaces, without actually exposing the above strings.
> |
> | In the HTML syntax, namespace prefixes and namespace declarations do not have the same effect as in XML. For instance, the colon has no special meaning in HTML element names.
> ===============================================
>
> Not sure we ever started a list of possible attribute additions to the X3D element.
>
> Not yet clear what kind of support is appropriate in our X3D schemas, DTD, schematron and tools like X3D-Edit.
>
> X3DOM considers x3d like a canvas tag with extensions are found at
> http://doc.x3dom.org/author/configuration.html
>
>> Parameter     Values     Default     Description
>> showLog     true, false     false     Hide or display the logging console
>> showStat     true, false     false     Hide or display the statistics overlay
>> showProgress     true, false     true     Hide or show the loading indicator.
>> PrimitiveQuality     High, Medium, Low, float     High/1.0     Render quality (tesselation level) for Box, Cone, Cylinder, Sphere.


all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list