[x3d-public] xml:lang language identification

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Wed Nov 17 07:12:02 PST 2021


Thanks for review comments.

I agree that using MetadataString for xml:lang definitions is a good approach for portable X3D mappings within MetadataSet collections.  Indeed that was the original approach we tried in the XMP mapping.  Further scrutiny will be needed to see if it can support multiple xml:lang definitions for a given value, that might be a separate design pattern.  Jakub and I will continue to look closely at this.

Meanwhile, the xml:lang attribute is allowed by XML.  Thus am still looking to add it to X3D XML Schema and DOCTYPE (and possibly X3D JSON schema) as an attribute allowed during XML validation, at least for the handful of X3D use cases where it might make sense.  Flagging presence of xml:lang values as erroneous would be a “false negative,” meaning an incorrect error diagnostic.

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: x3d-public <x3d-public-bounces at web3d.org> On Behalf Of John Carlson
Sent: Wednesday, November 17, 2021 6:53 AM
To: vmarchetti at kshell.com
Cc: X3D-Public <x3d-public at web3d.org>
Subject: Re: [x3d-public] xml:lang language identification

Thanks, Vince.   That’s pretty much what I wanted to say.  I don’t know if schemas can apply xml:lang to an attribute in all XML documents guided by the schema.   I don’t think that would make sense.   I am not arguing a position, because I have not studied.

I’ve had problems with namespaced attribute names in the past.   I suggest we go through a thorough test after any updates to X3DUOM.

John

Sent from my iPad


On Nov 16, 2021, at 6:24 PM, vmarchetti at kshell.com<mailto:vmarchetti at kshell.com> wrote:



On Nov 16, 2021, at 6:00 PM, Brutzman, Donald (Don) (CIV) <brutzman at nps.edu<mailto:brutzman at nps.edu>> wrote:

XML allows identification of language via the reserved xml:lang attribute on any attribute.


  *   XML Recommendation, fifth edition, W3C, section2.12 Language Identification
  *   https://www.w3.org/TR/REC-xml/#sec-lang-tag<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.w3.org%2FTR%2FREC-xml%2F%23sec-lang-tag&data=04%7C01%7Cbrutzman%40nps.edu%7C137e574dab04459fe46508d9a9da0766%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637727577061745557%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=8DlrFwOBelyqH3eSiiE0n4v9Ckl9QyZ%2FTmPmPXwc0yc%3D&reserved=0>

and


  *   W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes, W3C Recommendation 5 April 2012 section 3.4.3 language
  *   https://www.w3.org/TR/xmlschema11-2/#language<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.w3.org%2FTR%2Fxmlschema11-2%2F%23language&data=04%7C01%7Cbrutzman%40nps.edu%7C137e574dab04459fe46508d9a9da0766%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637727577061755516%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=FlSNzavMGA1LKJaLFhjTsG%2FwW01LlunyEWzzXEpruQo%3D&reserved=0>

These excerpts from the XML documents assert that the xml:lang attribute is not as granular as applying to individual attributes, but applies at
the XML element level, and so to all the attributes and subelements , with some clear rules for overriding the xml:lang attribute in sub-elements.

With that in mind, I think that the function of the xml:lang attribute can, in the X3D abstract specification, be performed by a MetadataString node which can be applied to any X3D node, including
other Metadata nodes. The advantage of this approach would be that the language attribution can be readily transferred between different encodings of the same X3D content.






Today while working on XMP metadata transcription from RDF/XML (or TTL) form into X3D/XML form, Jakub and I found that we needed to utilize xml:lang attribute for lossless two-way conversion.

I can think of the following X3D elements that might need to indicate which identification of human language might be appropriate:

  *   Text node (corresponding to ‘string’ field)
  *   MetadataString
  *   <field> and <fieldValue> declarations, if type is SFString/MFString

Conceivably we might also permit this whenever a description field is present also (Viewpoint, sensors, etc.).

Not looking to change X3D expressive power but think that xml:lang information ought to be permissible in X3D XML encoding since it is an allowed part of XML.

Thus am planning to add xml:lang as indicated above in the X3D XML Schema and X3D XML DOCTYPE to avoid incorrect, misleading validation errors.

Any other considerations appropriate?  Will enter Mantis issue when ready to proceed.  All comments welcome.

all the best, Don
--
Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu<mailto: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<http://faculty.nps.edu/brutzman>

_______________________________________________
x3d-public mailing list
x3d-public at web3d.org<mailto:x3d-public at web3d.org>
http://web3d.org/mailman/listinfo/x3d-public_web3d.org

_______________________________________________
x3d-public mailing list
x3d-public at web3d.org<mailto:x3d-public at web3d.org>
http://web3d.org/mailman/listinfo/x3d-public_web3d.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20211117/df3b27a5/attachment-0001.html>


More information about the x3d-public mailing list