namespace choice withTools -> Generating Sample XML file

Having trouble installing Oxygen? Got a bug to report? Post it all here.
PaulHermans
Posts: 82
Joined: Sat Jan 13, 2007 5:39 pm
Location: Belgium

namespace choice withTools -> Generating Sample XML file

Post by PaulHermans »

<oXygen/> XML Editor 12.1, build 2011031114

XSD snippet

Code: Select all


<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.example.com/vocab/product"
targetNamespace="http://www.example.com/vocab/product"
elementFormDefault="qualified"
>
<xsd:import
namespace="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
schemaLocation="rdf.xsd" />
<xsd:import
namespace="http://www.w3.org/1999/xhtml"
schemaLocation="http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd" />
<xsd:include
schemaLocation="datatypes.xsd" />
<xsd:element
name="product">...</xsd:element>
having only one root element in the target namespace schema.

With Oxygen's Tools -> Generating Sample XML file
I get http://www.w3.org/1999/xhtml as namespace and only xhtml elements as potential root elements.

While another product generates

Code: Select all


<?xml version="1.0"?>
<p1:product p2:about="URI" xmlns:p1="http://www.example.com/vocab/product"
xmlns:p2="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.example.com/vocab/product ./IPDC.xsd">
<!--Attribute p2:about is optional-->
<p1:ID>URI</p1:ID>
<p1:titel>string</p1:titel>
<p1:naam>string</p1:naam>
<p1:inhoud>
<!--'Sequence' block is optional-->
<!--Any Element, maxOccurs=unbounded-->
<any_element/>
<any_element/>
<any_element/>
</p1:inhoud>
....
</p1:product>
conforming to my expectations.

Am I overlooking something to get the correct target namespace in Oxygen?
Paul
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: namespace choice withTools -> Generating Sample XML file

Post by sorin_ristache »

Hello,

In Oxygen I get in the Root Element combo box all the XHTML elements and the product one from the http://www.example.com/vocab/product namespace. If I select product the http://www.example.com/vocab/product namespace is selected in the Namespace box and I can generate an XML instance with the product root element. Did you try to select product in the Root Element combo box?


Regards,
Sorin
PaulHermans
Posts: 82
Joined: Sat Jan 13, 2007 5:39 pm
Location: Belgium

Re: namespace choice withTools -> Generating Sample XML file

Post by PaulHermans »

Indeed.

I expected, according to the order of the fields, that I could first choose the namespace and then the element, but it works the other way around.

Thanks.


Paul
Paul
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: namespace choice withTools -> Generating Sample XML file

Post by sorin_ristache »

I think you are right, the namespace box should be a combo box too. I will file an enhancement request in our system.


Regards,
Sorin
Post Reply