> On 28 Mar, 20:59, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >      I just started using SDO_XML and it is proving extremely useful.
> > I just wanted to ask a quick question that someone might know.  I have
> > several schemas that use qualified elements, so I have to put a prefix
> > on the element names.  Is there anyway I can force the saved xml to
> > have a prefix on the default namespace?
> >
> > Thanks,
> >      Charlie
> Hi Charlie, I don't have a difinitive answer for you but looking at
> the code it looks like this is the way that libxml2 does things so you
> may be stuck with it for the time being. This is the line from
> SDOXMLWriter.cpp that writes out the root element:
> rc = xmlTextWriterStartElementNS(writer, NULL, elementName,
> elementURI);
> So it looks like its down to how libxml2 handles the elementName and
> namespace URI. There may be a way of changing this so I'm hoping one
> of the SDO experts will jump in if that is the case.
> I have found the qualification (or not) of elements to be a bit of a
> minefield.  Can I just check that when you say "force the saved xml to
> have a prefix on the default namespace?" I assume you are talking
> about having:
> <tns:SomeElement xmlns:tn="my namespace"/>
> as opposed to
> <SomeElement xmlns="mynamesapce"/>
> At the root element level.  Is that right?

That's the gist of it.  I should clarify that the validation problems
really only pop up when I am required to use qualified attributes.  I
think a way to address this would be to have a function to bridge to
DOM.  DOM allows you to control prefixes.  How hard would it be to add
a new function:

DOMDocument SDO_DAS_XML::saveDOM(SDO_XMLDocument $xdoc)

Just writing to a string and file can be somewhat limiting.


You received this message because you are subscribed to the Google Groups 
"phpsoa" group.
To post to this group, send email to phpsoa@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to