Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You need a second schema to describe the Signature namespace. The following code build a simple example for a xml file based on two different namespaces.</p> <p>Here the second namespace schema ...</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!-- second namespace schema --&gt; &lt;schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://my.second.namespace" xmlns:tns="http://my.second.namespace" elementFormDefault="qualified"&gt; &lt;element name="SomethingElse" type="string"&gt;&lt;/element&gt; &lt;/schema&gt; </code></pre> <p>The schema for the main namespace ...</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!-- first namespace schema --&gt; &lt;schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://my.first.namespace" xmlns:tns="http://my.first.namespace" xmlns:S="http://my.first.namespace" xmlns:T="http://my.second.namespace" elementFormDefault="qualified"&gt; &lt;import namespace="http://my.second.namespace" schemaLocation="./SecondNamespaceSchema.xsd"/&gt; &lt;element name="Root"&gt; &lt;complexType&gt; &lt;sequence&gt; &lt;element name="Head"&gt; &lt;complexType&gt; &lt;sequence&gt; &lt;element name="Something" type="string"&gt;&lt;/element&gt; &lt;element ref="T:SomethingElse"/&gt; &lt;/sequence&gt; &lt;/complexType&gt; &lt;/element&gt; &lt;element name="Body" type="string"&gt;&lt;/element&gt; &lt;/sequence&gt; &lt;/complexType&gt; &lt;/element&gt; &lt;/schema&gt; </code></pre> <p>... and a sample xml that puts all together.</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;!-- validatable xml file - proved with eclipse validator --&gt; &lt;S:Root xmlns:S="http://my.first.namespace" xmlns:T="http://my.second.namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://my.first.namespace ./Sample.xsd"&gt; &lt;S:Head&gt; &lt;S:Something/&gt; &lt;T:SomethingElse/&gt; &lt;/S:Head&gt; &lt;S:Body&gt; &lt;/S:Body&gt; &lt;/S:Root&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload