[xsl] Insert elment in XSD

Subject: [xsl] Insert elment in XSD
From: <igutierrez027@xxxxxxxxxxxxx>
Date: Thu, 28 Feb 2008 12:43:21 +0100 (CET)
Hello everybody!

I have one XSD and I need insert into it one elment along one
stylesheet. I am using XSLT 2.0 with Oxygen.

This is my XSD:

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified"
  targetNamespace="http://bibtexml.sf.net/";
xmlns:dc="http://purl.org/dc/elements/1.1/";
  xmlns:ns1="http://bibtexml.sf.net/"; version="2.0">

  <xs:import namespace="http://purl.org/dc/elements/1.1/";
schemaLocation="dc.xsd"/>

    <xs:element name="article">
    <xs:complexType>
      <xs:all>

        <xs:element ref="ns1:author" minOccurs="1" maxOccurs="1"/>
        <xs:element ref="ns1:title" minOccurs="1" maxOccurs="1"/>

      </xs:all>
    </xs:complexType>
  </xs:element>


The element that I need insert is

<xs:element ref="ns1:reviewed" minOccurs="0" maxOccurs="1"/>

and I need to insert it between de tag <xs:all> . The result was:

 <xs:element name="article">
    <xs:complexType>
      <xs:all>

<xs:element ref="ns1:reviewed" minOccurs="0" maxOccurs="1"/>

<xs:element ref="ns1:author" minOccurs="1" maxOccurs="1"/>
<xs:element ref="ns1:title" minOccurs="1" maxOccurs="1"/>

      </xs:all>
    </xs:complexType>
  </xs:element>

I know how to create the element, but I need the template's
instructions to instert it into the XSD using the Stylesheet.

Somebody could help me?

Thank You.

Current Thread