I’m preparing a computer science degree thesis on xml-based 3d formats and I’m focusing on COLLADA. I have to write an application which has to take a .dae file as input and produce as output a HTML document describing in human language the content of the file.
E.g.:
Scene Contents
7 solids
2 cameras
3 lights
and so on… (just a simplified version)
I’m writing an xsl stylesheet to do that,but I don’t know how to resolve the default namespace of the collada document. My stylesheet works only if i delete the namespace declaration from the COLLADA document. With the namespace declaration in the document i get only a blank page as a result.
Can anyone help me?
Thx
What that “says” is that you are using the COLLADA namespace. And then you are using the Schema-instance namespace with the prefix xsi:. then you are using the attribute schemaLocation which is defined in the xsi namespace. The schemaLocation attribute requires two values. The first is the namespace that you want to locate. The second is a path to locate the schema document.
For me I use a local copy of the schema. You can also specify a web address. Look here for more info on that.
What version of xslt are you using? 1.0? If so if the source document uses a XML schema instead of a DTD then you will need to make sure to use the namespace when selecting nodes. For example, try
your code works,nickmalthus but i don’t know why you add the attribute xmlns=“XHTML namespace”.
Can you suggest me a good tutorial to better comprehend xml namespace-related matter?
is there a w3 official tutorial on xml namespace?
thx for your help