[x3d-public] Metadata nodes only include other Metadata nodes

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Sat Jul 2 11:11:32 PDT 2022


John and Holger, just noticed an error in this scene excerpt:

 

*	DirectionalLight is not an allowed child node within MetadataSet
*	That is because MetadataSet can only contain other Metadata* nodes
as child values

 

References:

 

*	X3D4 Architecture, annex 7 Core Component, clause 7.4.5 MetadataSet
*
https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-DIS/Part01/
components/core.html#MetadataSet

 

MetadataSet : X3DNode, X3DMetadataObject { 

  SFNode   [in,out] metadata  NULL [X3DMetadataObject]

  SFString [in,out] name      ""

  SFString [in,out] reference ""

  MFNode   [in,out] value     [] [X3DMetadataObject]

}

The value field provides a list of X3DMetadataObject nodes whose meaning is
specified by the name field.

*	X3D Tooltips, MetadataSet
*	https://www.web3d.org/x3d/content/X3dTooltips.html#MetadataSet
*	I have added warnings to tooltips for all Metadata* nodes
(MetadataBoolean   MetadataDouble   MetadataFloat   MetadataInteger
MetadataSet   MetadataString) in this regard
*	Also added a tooltip hint that Metadata nodes are allowed as root
nodes within a scene
*	X3D4 Architecture, annex 4 Concepts, 4.3.2 Root nodes
*
https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-DIS/Part01/
concepts.html#Rootnodes

 

Validation: a variety of other tools should detect this problem.  I made
some small improvements in documentation and diagnostic explanations, since
X3D4 changes default containerField to 'value' which means that undefined
default containerField values may need changing in some scenes when
upgrading to X3D4.

 

*	XML DOCTYPE
https://www.web3d.org/specifications/X3dDoctypeDocumentation4.0.html#Metadat
aSet
*	XML Schema
https://www.web3d.org/specifications/X3dSchemaDocumentation4.0/x3d-4.0_Metad
ataSet.html
*	X3D Schematron
https://www.web3d.org/x3d/tools/schematron/X3dSchematron.html
*	X3D Tidy
https://www.web3d.org/x3d/stylesheets/X3dTidy.html
*	X3D Unified Object Model (X3DUOM) clearly states that MetadataSet
can only contain other X3DMetadateNodes.
*	Thus strong node typing in Java X3DJSAIL and Python X3DPSAIL
(x3d.py) only accept those nodes as well - tested satisfactorily.

 

Also updated test scene and translations at

 

*
https://www.web3d.org/x3d/content/examples/Basic/development/TestMetadata.x3
d
*
https://www.web3d.org/x3d/content/examples/Basic/development/TestMetadataNod
esIndex.html

 

Have fun with X3D4 metadata sets!  8)

 

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 https://
faculty.nps.edu/brutzman

 

From: John Carlson <yottzumm at gmail.com> 
Sent: Friday, July 1, 2022 2:24 PM
To: Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
Cc: Holger Seelig <holger.seelig at yahoo.de>; X3D Graphics public mailing list
<x3d-public at web3d.org>
Subject: Re: [x3d-public] X3dToPython.xslt warnings and errors produced from
Holger's examples

 

Here are rereported issues. 

 

One can download the create3000 Library with:

 

git clone https://github.com/create3000/Library
<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co
m%2Fcreate3000%2FLibrary&data=05%7C01%7Cbrutzman%40nps.edu%7C7ca51788111a48f
79ca608da5ba7ff3a%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C6379230747783
04673%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik
1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=PII38%2BCFjfJsYlERQQJ1yPgW4fTBnY7
STuoYAm2aNWQ%3D&reserved=0> 

 

Then use X3dToPython.xslt in Library/Tests/Components/ParticleSystems/.

 

translating to python
BEGIN ../Library/Tests/Components/ParticleSystems/Bubbles.x3d > py, ***
Warning: X3dToPython.xslt attribute type not found for DirectionalLight
field 'shadows'
*** Error: tuple-size not found for type '' (type value missing)
END ../Library/Tests/Components/ParticleSystems/Bubbles.x3d

BEGIN ../Library/Tests/Components/ParticleSystems/Fire.x3d > py, ***
Warning: X3dToPython.xslt attribute type not found for DirectionalLight
field 'shadows'
*** Error: tuple-size not found for type '' (type value missing)
END ../Library/Tests/Components/ParticleSystems/Fire.x3d

 

Since shadows is an SFBool, there is no tuple-size, perhaps?

 

The above errors show that type is '', not SFBool.  I can't figure out the
XSLT yet.

 

I will look at the XML.

 

Here's one example from Bubbles.x3d:

 

        <MetadataSet DEF='Selection' containerField='value'
            name='Selection'
            reference='http://titania.create3000.de
<https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftitania.cr
eate3000.de%2F&data=05%7C01%7Cbrutzman%40nps.edu%7C7ca51788111a48f79ca608da5
ba7ff3a%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637923074778304673%7CUn
known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJX
VCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Zu8BlsdTJpf7vei5WDWBTdzk32ExC23VMWRhRk9wq%2
BI%3D&reserved=0> '>
          <MetadataSet DEF='previous' containerField='value'
              name='previous'
              reference='http://titania.create3000.de
<https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftitania.cr
eate3000.de%2F&data=05%7C01%7Cbrutzman%40nps.edu%7C7ca51788111a48f79ca608da5
ba7ff3a%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637923074778304673%7CUn
known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJX
VCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Zu8BlsdTJpf7vei5WDWBTdzk32ExC23VMWRhRk9wq%2
BI%3D&reserved=0> '/>
          <MetadataSet DEF='children' containerField='value'
              name='children'
              reference='http://titania.create3000.de
<https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftitania.cr
eate3000.de%2F&data=05%7C01%7Cbrutzman%40nps.edu%7C7ca51788111a48f79ca608da5
ba7ff3a%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637923074778304673%7CUn
known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJX
VCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Zu8BlsdTJpf7vei5WDWBTdzk32ExC23VMWRhRk9wq%2
BI%3D&reserved=0> '>
            <DirectionalLight DEF='_1' containerField='value'
                direction='-0.372556 -3.8217e-05 -0.92801'
                shadows='true'
                shadowIntensity='0.518717'/>
          </MetadataSet>
        </MetadataSet>
      </MetadataSet>

 

Here's another from Fire.x3d:

 

    <DirectionalLight DEF='_1'
        direction='-0.531638 -0.672816 -0.51447'
        shadows='true'
        shadowIntensity='0.605'/>

 

Hope this helps.  I'm bamboozled until I can find  a better XSLT debugger.
We're a bit over budget the last few months.

 

Looks like everything is up-to-date.

 

I'd like to make sure Fire.py works before proceeding to further debug
x3djsonld.py, so I know I have a good example python to pull ideas from.

 

There are no examples of DirectionalLight and attribute shadows in the X3D
Examples on sourceforge.  Perhaps it's time to add an example?

 

I'm presently downloading Savage.  Maybe we'll get lucky.

 

Thanks!

 

John

 

On Fri, Jul 1, 2022 at 3:48 PM John Carlson <yottzumm at gmail.com
<mailto:yottzumm at gmail.com> > wrote:

Background for what I'm going to test. I'm in-line with your analysis of
this one issue.  I don't recall if 'shadows' in DirectionalLight is still an
issue (see thread).  I've been able to address the gzip issue on my own
system.   There may be more issues to address.

 

Here's how i test in X3DJSONLD:

 

X3DJSONLD/src/main/shell $ bash don.sh
../Library/Tests/Components/ParticleSystems/*.x3d

 

You may use a single .x3d file.

 

I'm going to run downstairs to run the test.

 

On Fri, Jul 1, 2022 at 9:16 AM Brutzman, Donald (Don) (CIV)
<brutzman at nps.edu <mailto:brutzman at nps.edu> > wrote:

Nor is particleElasticity (or the word "elasticity") found in X3D4
specification.  Thus not in any other validation tools.

 

*
https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-DIS/Part01/
components/particleSystems.html

 

And so, looking around, wondering what is being talked about.  Presumably a
browser-specific extension, building on the X in X3D.

From: x3d-public <x3d-public-bounces at web3d.org
<mailto:x3d-public-bounces at web3d.org> > On Behalf Of John Carlson
Sent: Sunday, June 26, 2022 1:46 PM
To: Holger Seelig <holger.seelig at yahoo.de <mailto:holger.seelig at yahoo.de> >;
X3D Graphics public mailing list <x3d-public at web3d.org
<mailto:x3d-public at web3d.org> >
Subject: Re: [x3d-public] X3dToPython.xslt warnings and errors produced from
Holger's examples

 

Holger's example:

 

translating to json
BEGIN ../Library/Tests/Components/ParticleSystems/Waterfall.x3d > json,
Warning: X3dToJson.xslt attribute type not found for ParticleSystem
particleElasticity
END ../Library/Tests/Components/ParticleSystems/Waterfall.x3d

 

particleElasticity not found in X3DUOM

 

So specific to Holger's use case, I guess.

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220702/ec27877d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5353 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220702/ec27877d/attachment-0001.p7s>


More information about the x3d-public mailing list