namespace choice withTools -> Generating Sample XML file
Posted: Tue Mar 22, 2011 5:06 pm
<oXygen/> XML Editor 12.1, build 2011031114
XSD snippet
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
conforming to my expectations.
Am I overlooking something to get the correct target namespace in Oxygen?
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>
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>
Am I overlooking something to get the correct target namespace in Oxygen?