Results 1 to 7 of 7

Thread: Saving document

  1. #1

    Saving document

    Hi,

    after loding and modifing a COLLADA document i try to save this document and all COLLADA attributes (e.g. xmlnssi="..." xmlns:math="...") disappear.

    It keeps only the two attributs:

    - xmlns="http://www.collada.org/2008/03/COLLADASchema"
    - version="1.5.0"

    i tried dae.save(...), dae.write(..), dae.writeTo(...), dae.writeAll(...).

    Is there a way to save the modified document with all attributes of the COLLADA element?

    Thanks.

  2. #2
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: Saving document

    What library version are you using?

  3. #3

    Re: Saving document

    I m using colladadom 2.2.

  4. #4
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: Saving document

    The COLLADA schema declares three valid attributes for the <COLLADA> element: xmlns, version, and xml:base. According to XML and XML Schema language, element attributes must be declared in the schema in order to be valid in an instance document (i.e. a .dae file).

    The DOM is code generated from the COLLADA schema and therefore only reads and writes valid documents. Adding more attributes like you are trying to do would produce an invalid document.

    I hope that answers your question.

  5. #5

    Re: Saving document

    In this case, how would a valid COLLADa 1.5 document including mathml (and its namespace) look like ?

  6. #6

    Re: Saving document

    domFormula* formula = ...
    if(formula)
    {
    formula->setId(id.c_str());
    formula->setNSUri("http://www.w3.org/1998/Math/MathML");
    ...
    }
    Now the MathML Elements can be attached - don't forget to set the "mathml:" prefix.
    Patch for current DOM attached

  7. #7

    Re: Saving document

    Thank you! Will the patch be included in the next release of colladadom?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •