Results 1 to 4 of 4

Thread: HTML output from COLLADA instance document

  1. #1

    HTML output from COLLADA instance document

    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.
    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?

  2. #2
    Senior Member
    Join Date
    Aug 2005
    some tools require that you explicitly locate the schema document for a namespace. XMLSpy is one such tool. You cannot validate a document without it.

    You do this by using the XMLSchema-instance namespace and the schemaLocation attribute. This would go in the root element, ie. COLLADA

    heres an example
    Code :
    <COLLADA xmlns="" version="1.4.1" xmlns:xsi="" xsi:schemaLocation="
    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.

    You can try this out. It may help, may not.

  3. #3

    Re: HTML output from COLLADA instance document

    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
    Code :
    <?xml version="1.0"?>
    <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
    <xsl:template match="/cl:COLLADA">

  4. #4
    your code works,nickmalthus but i don't know why you add the attribute xmlns="".
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean