create XML document from xsd - choose target namespace?

I have a schema, that starts out with: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://portal.earthscope.org" xmlns:esdp="http://portal.earthscope.org" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"> <xs:import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/feature.xsd"> </xs:import> <xs:import namespace="http://www.opengis.net/ogc" schemaLocation="http://schemas.opengis.net/filter/1.1.0/filter.xsd"> </xs:import> ... When I try to create a new XML document and select this schema file, the create doc wizard chooses the ogc namespace, and therefore offers up as root element all the elements defined in the imported ogc schema. I would like to get the elements defined in *this* schema under the target namespace. I can't seem to change the offered namespace.
How do I get the create XML document wizard to choose the targetNamespace and the elements defined in this schema document?
Running Oxygen 8.2 on Mac OSX 10.4 Thanks, Linus

Dear Linus, The namespace we present in the textfield is for informative purpose only (and right now it is taken from the first element presented in the combo). But in the elements combo itself we put all globally defined elements (which thus can be root elements) alphabetically ordered. For example I added to the schema fragment you provided an element declaration: <xs:element name="el"/> and the added element appeared in the combo when I tried to create a new XML file from it. Do you think it would be a good idea to have a combo of namespaces and choosing a namespace to fill the elements combo with the elements only for that namespace? Regards, Radu -- Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Linus Kamb wrote:
I have a schema, that starts out with:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://portal.earthscope.org" xmlns:esdp="http://portal.earthscope.org" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml">
<xs:import namespace="http://www.opengis.net/gml"
schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/feature.xsd"> </xs:import> <xs:import namespace="http://www.opengis.net/ogc"
schemaLocation="http://schemas.opengis.net/filter/1.1.0/filter.xsd"> </xs:import>
...
When I try to create a new XML document and select this schema file, the create doc wizard chooses the ogc namespace, and therefore offers up as root element all the elements defined in the imported ogc schema.
I would like to get the elements defined in *this* schema under the target namespace.
I can't seem to change the offered namespace.
How do I get the create XML document wizard to choose the targetNamespace and the elements defined in this schema document?
Running Oxygen 8.2 on Mac OSX 10.4
Thanks, Linus
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

My apologies. There were so many elements in the drop-down box that I missed mine... I like the idea of the combo-box for the namespaces, and then only show valid choices for that namespace. In my situation, there are 4 possible choices in my namespace, but there are maybe 100 or more listed in the root element choice combo box. thanks, Linus Radu Coravu wrote:
Dear Linus,
The namespace we present in the textfield is for informative purpose only (and right now it is taken from the first element presented in the combo). But in the elements combo itself we put all globally defined elements (which thus can be root elements) alphabetically ordered.
For example I added to the schema fragment you provided an element declaration: <xs:element name="el"/> and the added element appeared in the combo when I tried to create a new XML file from it.
Do you think it would be a good idea to have a combo of namespaces and choosing a namespace to fill the elements combo with the elements only for that namespace?
Regards, Radu
participants (2)
-
Linus Kamb
-
Radu Coravu