org.eclipse.cosmos/tests/resource-modeling/org.eclipse.cosmos.rm.validation.tests/src/test-resources/acyclic/ValidCycleNullReference.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (download) (as text) (annotate)
Wed Aug 20 17:41:19 2008 UTC (17 months, 3 weeks ago) by dwhiteman
Branch: MAIN
CVS Tags: v1_0_0_i13, COSMOS_1_0_0
Branch point for: COSMOS-1_0_0
Changes since 1.2: +1 -1 lines
https://bugs.eclipse.org/bugs/show_bug.cgi?id=237924
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2006 by BEA, BMC, CA, Cisco, Dell, EMC, HP, IBM, Intel, Microsoft, and Sun.  All rights reserved. -->
<!-- Permission to copy, display, and distribute this Service Modeling Language Interop Workshop (SML-IF) XML Document, testing invalid cycles with acyclic references, in any medium without fee or royalty is hereby granted, provided that you include the following on ALL copies of the SML-IF XML Document, or portions thereof, that you make:
 
1. A link or URL to the SML-IF XML Document at this location: 
http://schemas.serviceml.org/smlif/acyclic/2006/10/InValidCycles.xml

2. The copyright notice as shown in the SML-IF XML Document.

BEA, BMC, CA, Cisco, Dell, EMC, HP, IBM, Intel, Microsoft, and Sun (collectively, the “Authors᾿) each agree to grant you a royalty-free license, under reasonable, non-discriminatory terms and conditions to their respective patents that they deem necessary to implement the Service Modeling Language Interop Workshop XML Document testing invalid cycles with acyclic references.

THE SML-IF XML DOCUMENT IS PROVIDED "AS IS," AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE SML-IF XML DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THE SML-IF XML DOCUMENT.

The name and trademarks of the Authors may NOT be used in any manner, including advertising or publicity pertaining to the SML-IF XML Document or its contents without specific, written prior permission. Title to copyright in the SML-IF XML Document will at all times remain with the Authors. -->
<model xmlns="http://www.w3.org/2008/09/sml-if" schemaComplete="true">
  <identity>
    <name>InvalidCyclesWithAcyclicReferences</name>
    <baseURI>
		http://interop.serviceml.org
	</baseURI>
    <description>
		A model is valid if an element instance with sml:acyclic="true" forms a cycle
		but is declared as a null SML reference (despite having a valid sml:uri scheme)
	</description>	
  </identity>
  <definitions>
    <document>
      <data> 
        <xs:schema targetNamespace="urn:university"
                 elementFormDefault="qualified"
                 xmlns:tns="urn:university"
                 xmlns:xs="http://www.w3.org/2001/XMLSchema"
                 xmlns:sml="http://www.w3.org/2008/09/sml">

          <xs:complexType name="OptionalCourseRefType" sml:acyclic="true">
          	<xs:sequence>
				<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>         
          	<xs:anyAttribute namespace="##any" processContents="lax"/>
          </xs:complexType>

           <xs:complexType name="RequiredCourseRefType">
            <xs:complexContent>
              <xs:extension base="tns:OptionalCourseRefType"/>
            </xs:complexContent>
          </xs:complexType>

          <xs:element name="Course" type="tns:CourseType"/>
          <xs:element name="Courses">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="Course" type="tns:CourseType" 
                            minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
            </xs:complexType>
          </xs:element>

          <xs:complexType name="CourseType">
            <xs:sequence>
              <xs:element name="Name" type="xs:string"/>
              <xs:element name="OptionalPreRequisite" 
                          type="tns:OptionalCourseRefType" 
                          minOccurs="0" maxOccurs="unbounded"/>
              <xs:element name="RequiredPreRequisite" 
                          type="tns:RequiredCourseRefType" 
                          minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
          </xs:complexType>
        </xs:schema>
      </data>
    </document>
  </definitions>
  <instances>
    <document>
      <docinfo>
        <aliases>
          <alias>Course1</alias>
        </aliases>
      </docinfo>
      <data> 
        <Course xmlns="urn:university"
           xmlns:sml="http://www.w3.org/2008/09/sml"> 
          <Name>Course1</Name>
          <RequiredPreRequisite sml:ref="true" sml:nilref="true">
            <sml:uri>Course2</sml:uri>
          </RequiredPreRequisite>
        </Course>
      </data>
    </document>
    <document>
      <docinfo> 
        <aliases>
          <alias>Course2</alias>
        </aliases>
      </docinfo>
      <data>
        <Course xmlns="urn:university"
           xmlns:sml="http://www.w3.org/2008/09/sml">
          <Name>Course2</Name>
          <OptionalPreRequisite sml:ref="1" sml:nilref="true">
            <sml:uri>Course3</sml:uri>
          </OptionalPreRequisite>
        </Course>
      </data>
    </document>
    <document>
      <docinfo> 
        <aliases>
          <alias>Course3</alias>
        </aliases>
      </docinfo>
      <data>
        <Course xmlns="urn:university"
           xmlns:sml="http://www.w3.org/2008/09/sml">
          <Name>Course3</Name>
          <OptionalPreRequisite sml:ref="true" sml:nilref="1">
            <sml:uri>Course1</sml:uri>
          </OptionalPreRequisite>
        </Course>
      </data>
    </document>
  </instances>
</model>