Thanks Christian. I'll check it.

Regards, Jorge.

Christian Kaltepoth escribió:
Hi Jorge,

I think you will need some kind of 'post-processing' of your document to achieve this. But this should be very easy by using XmlCursor.

You can find the some documentation here:
http://xmlbeans.apache.org/docs/2.0.0/guide/conNavigatingXMLwithCursors.html

And there is also a useful chapter on XmlCursor here:
http://xmlbeans.apache.org/documentation/tutorial_getstarted.html

Kind regards

Christian


Am Freitag, 25. Mai 2007 09:52 schrieb Jorge Rodríguez Sacristán:
Thanks Radu, but I think I wasn't very clear. I'll try with an example:

        <dss:SignRequest *xmlns:css="http://www.xxxxx.com/XXX"*
xmlns:ds="http://www.w3.org/2000/09/xmldsig#";......>
            <dss:OptionalInputs
*xmlns:css="http://www.xxxxx.com/XXX"*.....> ........
                   <css:PdfSignatureInfo
*xmlns:css="http://www.xxxxx.com/XXX"*>
                        .......
                   </css:PdfSignatureInfo>
                    <*css:KeySelector*>
                         ..........
                    </*css:KeySelector*>
                .........
            </dss:OptionalInputs>
                .............
        </dss:SignRequest>

As you can see the namespace prefix declaration is repeated at the root
element and at the PdfSignatureInfo element, and it's used both inside
and outside this PdfSignatureInfo element. That's a valid xml. The
problem is that the server that I'm talking to needs it to be exactly
that way. More specifically it needs the declaration at the
PdfSignatureInfo element. So I need that the xml document generated from
the XmlObject to act like that: it has to write that namespace prefix
declaration at least twice. I've managed to write it at the root or at
the first element that needs it, which turns to be OptionalInputs and
not PdfSignatureInfo.

I hope this has been clearer. thanks again.
Jorge.

Radu Preotiuc-Pietro escribió:
I assume you build your document using the XmlObject generated
interfaces. In that case the generated names (prefix + local name) will
match whatever you had in your Schema. You can 'fix' the namespaces/names
with XmlCursor, but that shouldn't be needed. A concrete example would
help in that case.

Radu

-----Original Message-----
From: Jorge Rodríguez Sacristán [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 24, 2007 3:52 AM
To: [email protected]
Subject: Force a namesapce

Hi all,
I'm using XmlBeans and XFire. One of the elements of the Xml I'm sending
needs the namespace prefix declaration at the beginig of the fragment,
althoug this namespace is also needed through out the rest of the
document, so it has to be declared at the root and then re-declared at
the beginig of the fragment. I've been playing around with XmlOptions but
can´t find a way to get this.

Thank you!
Jorge.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to