You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlbeans-user@xml.apache.org by Su...@united.com on 2004/05/14 20:20:23 UTC
Generating a Specific NameSpace
Hi,
I am trying to generate the following **exact** string (exclude the
single quotes):
'xsi:noNamespaceSchemaLocation="http://myLocation.xsd"'
I have tried the following cases:
Case 1:
'a_XmlCursor.insertNamespace("noNamespaceSchemaLocation",
"http://myLocation.xsd");'
Case 2:
'a_XmlCursor.insertNamespace("xsi", "http://myLocation.xsd");'
Case 3:
'a_XmlCursor.insertNamespace("xsi:noNamespaceSchemaLocation",
"http://myLocation.xsd");'
The results are:
Case 1 generates:
'xmlns:noNamespaceSchemaLocation="http://myLocation.xsd");'
Case 2 was ignored by XMLBeans;
Case 3 produce an error "Prefix is not valid"
Can somebody shed some light on this problem? Thanks...
Suraphol