[x3d-public] ChatGPT —run this prompt

John Carlson yottzumm at gmail.com
Thu Mar 23 04:10:14 PDT 2023


I’ll be posting my chatGPT results here, probably in several messages.

<xsl:stylesheet version="2.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform" xmlns:x3d="
http://www.web3d.org/specifications/x3d-namespace" xmlns:json="
http://www.json.org" exclude-result-prefixes="x3d"> <xsl:output method=
"text" omit-xml-declaration="yes" /> <xsl:template match="/"> <xsl:text>{</
xsl:text> <xsl:apply-templates select="//x3d:*" /> <xsl:text>&#xA;}</
xsl:text> </xsl:template> <xsl:template match="x3d:*[@containerField =
'children']"> <xsl:text>"</xsl:text> <xsl:value-of select="local-name()" />
<xsl:text>":[</xsl:text> <xsl:apply-templates select="*" /> <xsl:text>]</
xsl:text> <xsl:if test="following-sibling::*[@containerField = 'children']">
<xsl:text>,</xsl:text> </xsl:if> </xsl:template> <xsl:template match="x3d:*"
> <xsl:text>"</xsl:text> <xsl:value-of select="local-name()" /> <xsl:text>
":{</xsl:text> <xsl:apply-templates select="@*" /> <xsl:text>}</xsl:text> <
xsl:if test="following-sibling::*[@containerField = 'children']"> <xsl:text>
,</xsl:text> </xsl:if> </xsl:template> <xsl:template
match="@*[starts-with(local-name(),
'SF')]"> <xsl:text>"@</xsl:text> <xsl:value-of select="local-name()" /> <
xsl:text>":</xsl:text> <xsl:choose> <xsl:when test="starts-with(local-name(),
'SFInt')"> <xsl:text>"number"</xsl:text> </xsl:when> <xsl:when
test="starts-with(local-name(),
'SFFloat')"> <xsl:text>"number"</xsl:text> </xsl:when> <xsl:when
test="starts-with(local-name(),
'SFBool')"> <xsl:text>"boolean"</xsl:text> </xsl:when> <xsl:when
test="starts-with(local-name(),
'SFVec')"> <xsl:text>"array"</xsl:text> </xsl:when> <xsl:when
test="starts-with(local-name(),
'SFRotation')"> <xsl:text>"array"</xsl:text> </xsl:when> <xsl:when
test="starts-with(local-name(),
'SFColor')"> <xsl:text>"array"</xsl

On Thu, Mar 23, 2023 at 5:29 AM John Carlson <yottzumm at gmail.com> wrote:

> “Produce XSLT code that creates a mapping from the X3D unified object
> model ConcreteNodes to JSON subschema objects, using XSLT to transform
> input XML to output JSON.  Put “@“ in front of SF-prefixed field type
> property name and “-“ in front of MF-prefixed field type property name.
> Make use of recursion and lists to increase the number of ConcreteNodes
> handled in shorter code.“
>
> On Thu, Mar 23, 2023 at 5:04 AM John Carlson <yottzumm at gmail.com> wrote:
>
>> I added this, but now i will try to produce something in XSLT:
>>
>> put “@“ in front of SF-prefixed field type property names and “-“ in
>> front of MF-prefixed field type property names,  but not the SF-prefixed
>> field type property names.
>>
>>
>> John
>>
>> On Thu, Mar 23, 2023 at 4:47 AM John Carlson <yottzumm at gmail.com> wrote:
>>
>>>
>>> Instead, run “Produce a mapping from the X3D unified object model
>>> ConcreteNodes to JSON schema objects” several times, and if available,
>>> continue the results.
>>>
>>> I’m going to pursue creating code to produce what ChatGPT does.
>>>
>>> John
>>> On Thu, Mar 23, 2023 at 4:40 AM John Carlson <yottzumm at gmail.com> wrote:
>>>
>>>> I’m not too sure about how useful the “in JSON” will be.  I really want
>>>> a table.
>>>>
>>>> John
>>>>
>>>> On Thu, Mar 23, 2023 at 4:34 AM John Carlson <yottzumm at gmail.com>
>>>> wrote:
>>>>
>>>>> Can someone with a full chatGPT premium license run this prompt?
>>>>> Also try adding “in JSON” to the end of the prompt.  “Produce a mapping
>>>>> from the X3D unified object model ConcreteNodes to JSON schema objects.”
>>>>>
>>>>> Thanks!
>>>>>
>>>>> John
>>>>>
>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230323/37e0ef11/attachment-0001.html>


More information about the x3d-public mailing list