Guest User

Untitled

a guest
Jul 12th, 2025
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.88 KB | Source Code | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  3.           targetNamespace="http://linux.duke.edu/metadata/common"
  4.           xmlns:common="http://linux.duke.edu/metadata/common"
  5.           elementFormDefault="qualified"
  6.           attributeFormDefault="unqualified">
  7.  
  8.   <!-- Define common dependency entry type -->
  9.   <xs:complexType name="dependencyEntryType">
  10.     <xs:attribute name="name" type="xs:string" />
  11.     <xs:attribute name="flags" type="xs:string" />
  12.     <xs:attribute name="epoch" type="xs:string" />
  13.     <xs:attribute name="ver" type="xs:string" />
  14.     <xs:attribute name="rel" type="xs:string" />
  15.     <xs:attribute name="pre" type="xs:string" />
  16.   </xs:complexType>
  17.  
  18.   <!-- Define common dependency container type -->
  19.   <xs:complexType name="dependencyType">
  20.     <xs:sequence>
  21.       <xs:element name="entry" type="common:dependencyEntryType" minOccurs="0" maxOccurs="unbounded" />
  22.     </xs:sequence>
  23.   </xs:complexType>
  24.  
  25.   <!-- Common namespace elements -->
  26.   <xs:element name="license" type="xs:string" />
  27.   <xs:element name="vendor" type="xs:string" />
  28.   <xs:element name="group" type="xs:string" />
  29.   <xs:element name="buildhost" type="xs:string" />
  30.   <xs:element name="sourcerpm" type="xs:string" />
  31.  
  32.   <xs:element name="header-range">
  33.     <xs:complexType>
  34.       <xs:attribute name="start" type="xs:string" />
  35.       <xs:attribute name="end" type="xs:string" />
  36.     </xs:complexType>
  37.   </xs:element>
  38.  
  39.   <xs:element name="provides" type="common:dependencyType" />
  40.   <xs:element name="requires" type="common:dependencyType" />
  41.   <xs:element name="recommends" type="common:dependencyType" />
  42.   <xs:element name="conflicts" type="common:dependencyType" />
  43.   <xs:element name="obsoletes" type="common:dependencyType" />
  44.   <xs:element name="suggests" type="common:dependencyType" />
  45.  
  46.   <!-- Main metadata structure -->
  47.   <xs:element name="metadata">
  48.     <xs:complexType>
  49.       <xs:sequence>
  50.         <xs:element name="package" minOccurs="0" maxOccurs="unbounded">
  51.           <xs:complexType>
  52.             <xs:all>
  53.               <xs:element name="name" type="xs:string" minOccurs="0" />
  54.               <xs:element name="arch" type="xs:string" minOccurs="0" />
  55.               <xs:element name="version" minOccurs="0">
  56.                 <xs:complexType>
  57.                   <xs:attribute name="epoch" type="xs:string" />
  58.                   <xs:attribute name="ver" type="xs:string" />
  59.                   <xs:attribute name="rel" type="xs:string" />
  60.                 </xs:complexType>
  61.               </xs:element>
  62.               <xs:element name="checksum" minOccurs="0">
  63.                 <xs:complexType>
  64.                   <xs:simpleContent>
  65.                     <xs:extension base="xs:string">
  66.                       <xs:attribute name="type" type="xs:string" />
  67.                       <xs:attribute name="pkgid" type="xs:string" />
  68.                     </xs:extension>
  69.                   </xs:simpleContent>
  70.                 </xs:complexType>
  71.               </xs:element>
  72.               <xs:element name="time" minOccurs="0">
  73.                 <xs:complexType>
  74.                   <xs:attribute name="file" type="xs:string" />
  75.                   <xs:attribute name="build" type="xs:string" />
  76.                 </xs:complexType>
  77.               </xs:element>
  78.               <xs:element name="size" minOccurs="0">
  79.                 <xs:complexType>
  80.                   <xs:attribute name="package" type="xs:string" />
  81.                   <xs:attribute name="installed" type="xs:string" />
  82.                   <xs:attribute name="archive" type="xs:string" />
  83.                 </xs:complexType>
  84.               </xs:element>
  85.               <xs:element name="location" minOccurs="0">
  86.                 <xs:complexType>
  87.                   <xs:attribute name="href" type="xs:string" />
  88.                 </xs:complexType>
  89.               </xs:element>
  90.               <xs:element name="format" minOccurs="0">
  91.                 <xs:complexType>
  92.                   <xs:choice minOccurs="0" maxOccurs="unbounded">
  93.                     <!-- Allow any elements from rpm namespace or common namespace -->
  94.                     <xs:any namespace="http://linux.duke.edu/metadata/rpm http://linux.duke.edu/metadata/common ##local" processContents="lax" />
  95.                   </xs:choice>
  96.                 </xs:complexType>
  97.               </xs:element>
  98.               <xs:element name="summary" type="xs:string" minOccurs="0" />
  99.               <xs:element name="description" type="xs:string" minOccurs="0" />
  100.               <xs:element name="packager" type="xs:string" minOccurs="0" />
  101.               <xs:element name="url" type="xs:string" minOccurs="0" />
  102.             </xs:all>
  103.             <xs:attribute name="type" type="xs:string" />
  104.           </xs:complexType>
  105.         </xs:element>
  106.       </xs:sequence>
  107.       <xs:attribute name="packages" type="xs:string" />
  108.     </xs:complexType>
  109.   </xs:element>
  110.  
  111. </xs:schema>
Advertisement
Add Comment
Please, Sign In to add comment