[xsl] Phd Project - XSL for XML to X3D

Subject: [xsl] Phd Project - XSL for XML to X3D
From: j milo taylor <milo@xxxxxxxxxx>
Date: Sat, 02 Feb 2008 18:19:04 +0000
Hi everyone,

I am working on an interesting database-based realtime 3D application . It is a database of sound artists. A MySql query outputs an XML file, which i have got working fine. My aim is then to to transform this into a dynamically generated x3d virtual environment. I have got some guidance from the Stylus Studio list, they then pointed me here.

I am attempting then, MySQL -> XML -> X3D. And it is the transformation from XML to X3D that I am having difficulties with:

So i have an xml file containing my database content:

for example: *artists.xml*
------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="artists.xsl"?>
<artists>
<artist>
<2ndname>Marclay</2ndname>
</artist>
<artist>
<2ndname>Kubish</2ndname>
</artist>
<artist>
<2ndname>Gal</2ndname>
</artist>
</artists>
--------------------------------

and my artists xsl file: *artists.xsl*

------------------------------
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";> <http://www.w3.org/1999/XSL/Transform>
<xsl:output doctype-public="ISO//Web3D//DTD X3D 3.0//EN" doctype-system="http://www.web3d.org/specifications/x3d-3.0.dtd"; <http://www.web3d.org/specifications/x3d-3.0.dtd> method="xml" encoding="US-ASCII" indent="yes" omit-xml-declaration="yes"/>


<xsl:template match="/">

<X3D profile="Immersive" xsd:noNamespaceSchemaLocation="http://www.web3d.org/specifications/x3d-3.0.xsd"; <http://www.web3d.org/specifications/x3d-3.0.xsd> version="3.0">

<Scene>
<xsl:comment> create a transform for each cd </xsl:comment>
<xsl:apply-templates select="artists/artist"/>
</Scene>
</X3D>
</xsl:template>

<xsl:template match="artist">

<Transform>

<xsl:attribute name="translation">
<xsl:value-of select="(position() - 1) * 10"/>
<xsl:text> 0 0</xsl:text>
</xsl:attribute>

<Shape>
<Text string="{2ndname}"/>
</Shape>
</Transform>
</xsl:template>
</xsl:stylesheet>
------------------------------------

When I try to view this in firefox i get this error

XML Parsing Error: prefix not bound to a namespace
Location: http://localhost/xml/XSLT%20-%20sunday/artists.xsl
Line Number 6, Column 2: <X3D profile="Immersive" xsd:noNamespaceSchemaLocation="http://www.web3d.org/specifications/x3d-3.0.xsd"; version="3.0">
--------^


Can anyone help? More information about the project can be found at www.suborg.net --- research

Thanks and best regards

J Milo Taylor
Phd Student
CRiSAP Research Unit
London College of Communication

Current Thread