xerces-2j and qualified optional default attributes

Discussion in 'XML' started by Robert W., Oct 19, 2006.

  1. Robert W.

    Robert W. Guest

    Hi,
    I have written a schema, specifying attributeFormDefault and
    elementFormDefault to be "qualified". If I parse an instance document
    validating against this schema with the DOMParser from xerces2-j (2.8.0)
    and then serialising the DOM-tree again into a file, all optional attributes
    are added with their default values, but they are not qualified with a
    namespace-prefix, which finally prevents the serialised document from
    being valid with respect to the schema.
    How to tell xerces, to qualify the optional attributes with their
    namespace when they are added to the DOM-tree?

    --
    Thanks in advance,
    Robert...
     
    Robert W., Oct 19, 2006
    #1
    1. Advertising

  2. Robert W. wrote:

    > I have written a schema, specifying attributeFormDefault and
    > elementFormDefault to be "qualified". If I parse an instance document
    > validating against this schema with the DOMParser from xerces2-j (2.8.0)
    > and then serialising the DOM-tree again into a file, all optional attributes
    > are added with their default values, but they are not qualified with a
    > namespace-prefix, which finally prevents the serialised document from
    > being valid with respect to the schema.
    > How to tell xerces, to qualify the optional attributes with their
    > namespace when they are added to the DOM-tree?


    How exactly do you serialize the DOM tree? I can think of lots of ways
    that might or might not be Xerces specific. If you have problems with
    your serialization then show us the code you use to serialize.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Oct 19, 2006
    #2
    1. Advertising

  3. Robert W.

    Robert W. Guest

    On 2006-10-19, Martin Honnen wrote:
    > How exactly do you serialize the DOM tree? I can think of lots of ways
    > that might or might not be Xerces specific. If you have problems with
    > your serialization then show us the code you use to serialize.
    >


    Ehm, I tried to reproduce the problem with a simple java-application.
    This failed, although the problem persists in a tomcat environment. I
    think, I should retry to solve my problem in another NG. However,
    thank you.

    --

    Robert...
     
    Robert W., Oct 19, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bruce Atherton
    Replies:
    1
    Views:
    587
    Bruce Atherton
    Jan 15, 2004
  2. Edwin G. Castro

    xslt and optional attributes

    Edwin G. Castro, Sep 24, 2004, in forum: XML
    Replies:
    1
    Views:
    450
    Richard Tobin
    Sep 24, 2004
  3. cvissy
    Replies:
    0
    Views:
    627
    cvissy
    Nov 16, 2004
  4. VanOrton
    Replies:
    2
    Views:
    2,585
    VanOrton
    Nov 30, 2005
  5. Szabolcs Borsanyi

    Pointer to qualified poitner to qualified object

    Szabolcs Borsanyi, May 30, 2008, in forum: C Programming
    Replies:
    13
    Views:
    582
    Keith Thompson
    Jun 8, 2008
Loading...

Share This Page