xml.schema/test/unit/src/org/netbeans/modules/xml/schema/resources/PurchaseOrder.xsd
author Milutin Kristofic <mkristofic@netbeans.org>
Mon, 30 Jan 2017 14:30:54 +0100
changeset 1583 fe20f672a61a
parent 338 e2de2c0fb772
permissions -rw-r--r--
Added Missing copyright information in source files
samaresh@338
     1
<?xml version="1.0" encoding="UTF-8"?>
mkristofic@1583
     2
<!--
mkristofic@1583
     3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
mkristofic@1583
     4
mkristofic@1583
     5
Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
mkristofic@1583
     6
mkristofic@1583
     7
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
mkristofic@1583
     8
Other names may be trademarks of their respective owners.
mkristofic@1583
     9
mkristofic@1583
    10
The contents of this file are subject to the terms of either the GNU
mkristofic@1583
    11
General Public License Version 2 only ("GPL") or the Common
mkristofic@1583
    12
Development and Distribution License("CDDL") (collectively, the
mkristofic@1583
    13
"License"). You may not use this file except in compliance with the
mkristofic@1583
    14
License. You can obtain a copy of the License at
mkristofic@1583
    15
http://www.netbeans.org/cddl-gplv2.html
mkristofic@1583
    16
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
mkristofic@1583
    17
specific language governing permissions and limitations under the
mkristofic@1583
    18
License.  When distributing the software, include this License Header
mkristofic@1583
    19
Notice in each file and include the License file at
mkristofic@1583
    20
nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
mkristofic@1583
    21
particular file as subject to the "Classpath" exception as provided
mkristofic@1583
    22
by Oracle in the GPL Version 2 section of the License file that
mkristofic@1583
    23
accompanied this code. If applicable, add the following below the
mkristofic@1583
    24
License Header, with the fields enclosed by brackets [] replaced by
mkristofic@1583
    25
your own identifying information:
mkristofic@1583
    26
"Portions Copyrighted [year] [name of copyright owner]"
mkristofic@1583
    27
mkristofic@1583
    28
Contributor(s):
mkristofic@1583
    29
mkristofic@1583
    30
The Original Software is NetBeans. The Initial Developer of the Original
mkristofic@1583
    31
Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
mkristofic@1583
    32
Microsystems, Inc. All Rights Reserved.
mkristofic@1583
    33
mkristofic@1583
    34
If you wish your version of this file to be governed by only the CDDL
mkristofic@1583
    35
or only the GPL Version 2, indicate your decision by adding
mkristofic@1583
    36
"[Contributor] elects to include this software in this distribution
mkristofic@1583
    37
under the [CDDL or GPL Version 2] license." If you do not indicate a
mkristofic@1583
    38
single choice of license, a recipient has the option to distribute
mkristofic@1583
    39
your version of this file under either the CDDL, the GPL Version 2 or
mkristofic@1583
    40
to extend the choice of license to its licensees as provided above.
mkristofic@1583
    41
However, if you add GPL Version 2 code and therefore, elected the GPL
mkristofic@1583
    42
Version 2 license, then the option applies only if the new code is
mkristofic@1583
    43
made subject to such option by the copyright holder.
mkristofic@1583
    44
-->
samaresh@338
    45
samaresh@338
    46
<schema xmlns="http://www.w3.org/2001/XMLSchema"
samaresh@338
    47
        xmlns:po="http://www.example.com/PO1"
samaresh@338
    48
        xmlns:la="http://xml.netbeans.org/examples/LoanApplication"
samaresh@338
    49
        targetNamespace="http://www.example.com/PO1"
samaresh@338
    50
        elementFormDefault="unqualified"
samaresh@338
    51
        attributeFormDefault="unqualified">
samaresh@338
    52
  <import namespace="http://xml.netbeans.org/examples/LoanApplication" schemaLocation="LoanApplication.xsd"/>
samaresh@338
    53
samaresh@338
    54
  <element name="purchaseOrder" type="po:PurchaseOrderType"/>
samaresh@338
    55
  <element name="comment"       type="string"/>
samaresh@338
    56
samaresh@338
    57
  <complexType name="PurchaseOrderType">
samaresh@338
    58
    <sequence>
samaresh@338
    59
      <element name="shipTo"    type="po:USAddress"/>
samaresh@338
    60
      <element name="billTo"    type="la:AddressType"/>
samaresh@338
    61
      <element ref="po:comment" minOccurs="0"/>
samaresh@338
    62
      <!-- etc. -->
samaresh@338
    63
    </sequence>
samaresh@338
    64
    <!-- etc. -->
samaresh@338
    65
  </complexType>
samaresh@338
    66
samaresh@338
    67
  <complexType name="USAddress">
samaresh@338
    68
    <sequence>
samaresh@338
    69
      <element name="name"   type="string"/>
samaresh@338
    70
      <element name="street" type="string"/>
samaresh@338
    71
      <!-- etc. -->
samaresh@338
    72
    </sequence>
samaresh@338
    73
  </complexType>
samaresh@338
    74
  
samaresh@338
    75
  <simpleType name="allNNI">
samaresh@338
    76
  <annotation>
samaresh@338
    77
    <documentation>for maxOccurs</documentation>
samaresh@338
    78
  </annotation>
samaresh@338
    79
  <union memberTypes="nonNegativeInteger nonPositiveInteger">
samaresh@338
    80
   <simpleType>
samaresh@338
    81
    <restriction base="NMTOKEN">
samaresh@338
    82
     <enumeration value="unbounded"/>
samaresh@338
    83
    </restriction>
samaresh@338
    84
   </simpleType>
samaresh@338
    85
  </union>
samaresh@338
    86
 </simpleType>
samaresh@338
    87
samaresh@338
    88
samaresh@338
    89
samaresh@338
    90
  <!-- etc. -->
samaresh@338
    91
samaresh@338
    92
</schema>