element-conflicts?,
element-obsoletes?,
element-freshen?,
- element-requires?
+ element-requires?,
+ element-recommends?,
+ element-suggests?
element-category =
element category { "youfix" | "security" | "recommended" | "bonus" | "beta" }
<optional>
<ref name="element-requires"/>
</optional>
+ <optional>
+ <ref name="element-recommends"/>
+ </optional>
+ <optional>
+ <ref name="element-suggests"/>
+ </optional>
</define>
<define name="element-category">
<element name="category">
-default namespace = "http://linux.duke.edu/metadata/patterns"
+default namespace = "http://novell.com/package/metadata/suse/pattern"
-element patterns {
- element pattern {
+include "suse-primary.rnc" {
+ start = element-pattern
+ # names in dependencies can include a "kind". Should not be used for packages.
+ attribute-name =
+ attribute kind { "package" | "patch" | "script" | "message" | "product" }?,
+ attribute name { text }
+}
+
+element-pattern = element pattern { pattern }
+
+pattern =
element patternid { text },
element name {
attribute lang { text }?,
}+,
element default { "true" | "false" }?,
element uservisible { "true" | "false" },
+ element category { text },
+ element icon { text },
+ element script { text }?,
element description {
attribute lang { text }?,
text
}+,
- element patternlist {
- element metapkg {
- attribute type { text }?,
- text
- }+
- }?,
- element packagelist {
- element packagereq {
- attribute type { text }?,
- attribute epoch { xsd:nonNegativeInteger },
- attribute ver { text },
- attribute rel { text },
- text
- }+
- }?,
- empty
- }+,
- empty
-}
+ element-provides?,
+ element-conflicts?,
+ element-obsoletes?,
+ element-freshen?,
+ element-requires?,
+ element-suggests?,
+ element-recommends?
<?xml version="1.0" encoding="UTF-8"?>
-<element name="patterns" ns="http://linux.duke.edu/metadata/patterns" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
- <oneOrMore>
- <element name="pattern">
- <element name="patternid">
- <text/>
- </element>
- <oneOrMore>
- <element name="name">
- <optional>
- <attribute name="lang"/>
- </optional>
- <text/>
- </element>
- </oneOrMore>
+<grammar ns="http://novell.com/package/metadata/suse/pattern" xmlns="http://relaxng.org/ns/structure/1.0">
+ <include href="suse-primary.rng">
+ <start>
+ <ref name="element-pattern"/>
+ </start>
+ <!-- names in dependencies can include a "kind". Should not be used for packages. -->
+ <define name="attribute-name">
<optional>
- <element name="default">
+ <attribute name="kind">
<choice>
- <value>true</value>
- <value>false</value>
+ <value>package</value>
+ <value>patch</value>
+ <value>script</value>
+ <value>message</value>
+ <value>product</value>
</choice>
- </element>
+ </attribute>
</optional>
- <element name="uservisible">
+ <attribute name="name"/>
+ </define>
+ </include>
+ <define name="element-pattern">
+ <element name="pattern">
+ <ref name="pattern"/>
+ </element>
+ </define>
+ <define name="pattern">
+ <element name="patternid">
+ <text/>
+ </element>
+ <oneOrMore>
+ <element name="name">
+ <optional>
+ <attribute name="lang"/>
+ </optional>
+ <text/>
+ </element>
+ </oneOrMore>
+ <optional>
+ <element name="default">
<choice>
<value>true</value>
<value>false</value>
</choice>
</element>
- <oneOrMore>
- <element name="description">
- <optional>
- <attribute name="lang"/>
- </optional>
- <text/>
- </element>
- </oneOrMore>
- <optional>
- <element name="patternlist">
- <oneOrMore>
- <element name="metapkg">
- <optional>
- <attribute name="type"/>
- </optional>
- <text/>
- </element>
- </oneOrMore>
- </element>
- </optional>
- <optional>
- <element name="packagelist">
- <oneOrMore>
- <element name="packagereq">
- <optional>
- <attribute name="type"/>
- </optional>
- <attribute name="epoch">
- <data type="nonNegativeInteger"/>
- </attribute>
- <attribute name="ver"/>
- <attribute name="rel"/>
- <text/>
- </element>
- </oneOrMore>
- </element>
- </optional>
- <empty/>
+ </optional>
+ <element name="uservisible">
+ <choice>
+ <value>true</value>
+ <value>false</value>
+ </choice>
+ </element>
+ <element name="category">
+ <text/>
+ </element>
+ <element name="icon">
+ <text/>
</element>
- </oneOrMore>
- <empty/>
-</element>
+ <optional>
+ <element name="script">
+ <text/>
+ </element>
+ </optional>
+ <oneOrMore>
+ <element name="description">
+ <optional>
+ <attribute name="lang"/>
+ </optional>
+ <text/>
+ </element>
+ </oneOrMore>
+ <optional>
+ <ref name="element-provides"/>
+ </optional>
+ <optional>
+ <ref name="element-conflicts"/>
+ </optional>
+ <optional>
+ <ref name="element-obsoletes"/>
+ </optional>
+ <optional>
+ <ref name="element-freshen"/>
+ </optional>
+ <optional>
+ <ref name="element-requires"/>
+ </optional>
+ <optional>
+ <ref name="element-suggests"/>
+ </optional>
+ <optional>
+ <ref name="element-recommends"/>
+ </optional>
+ </define>
+</grammar>
attribute pre { "1" | "0" }?,
empty
}*
+ }?,
+ element recommends {
+ element entry {
+ attribute name { text },
+ attribute kind { "package" | "patch" | "script" | "message" | "product"}?,
+ (attribute flags { "EQ" | "LE" | "GE" | "LT" | "GT" },
+ attribute epoch { xsd:nonNegativeInteger },
+ attribute ver { text },
+ attribute rel { text }?)?,
+ attribute pre { "1" | "0" }?,
+ empty
+ }*
+ }?,
+ element suggests {
+ element entry {
+ attribute name { text },
+ attribute kind { "package" | "patch" | "script" | "message" | "product"}?,
+ (attribute flags { "EQ" | "LE" | "GE" | "LT" | "GT" },
+ attribute epoch { xsd:nonNegativeInteger },
+ attribute ver { text },
+ attribute rel { text }?)?,
+ attribute pre { "1" | "0" }?,
+ empty
+ }*
}?
}
</zeroOrMore>
</element>
</optional>
+ <optional>
+ <element name="recommends">
+ <zeroOrMore>
+ <element name="entry">
+ <attribute name="name"/>
+ <optional>
+ <attribute name="kind">
+ <choice>
+ <value>package</value>
+ <value>patch</value>
+ <value>script</value>
+ <value>message</value>
+ <value>product</value>
+ </choice>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="flags">
+ <choice>
+ <value>EQ</value>
+ <value>LE</value>
+ <value>GE</value>
+ <value>LT</value>
+ <value>GT</value>
+ </choice>
+ </attribute>
+ <attribute name="epoch">
+ <data type="nonNegativeInteger"/>
+ </attribute>
+ <attribute name="ver"/>
+ <optional>
+ <attribute name="rel"/>
+ </optional>
+ </optional>
+ <optional>
+ <attribute name="pre">
+ <choice>
+ <value>1</value>
+ <value>0</value>
+ </choice>
+ </attribute>
+ </optional>
+ <empty/>
+ </element>
+ </zeroOrMore>
+ </element>
+ </optional>
+ <optional>
+ <element name="suggests">
+ <zeroOrMore>
+ <element name="entry">
+ <attribute name="name"/>
+ <optional>
+ <attribute name="kind">
+ <choice>
+ <value>package</value>
+ <value>patch</value>
+ <value>script</value>
+ <value>message</value>
+ <value>product</value>
+ </choice>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="flags">
+ <choice>
+ <value>EQ</value>
+ <value>LE</value>
+ <value>GE</value>
+ <value>LT</value>
+ <value>GT</value>
+ </choice>
+ </attribute>
+ <attribute name="epoch">
+ <data type="nonNegativeInteger"/>
+ </attribute>
+ <attribute name="ver"/>
+ <optional>
+ <attribute name="rel"/>
+ </optional>
+ </optional>
+ <optional>
+ <attribute name="pre">
+ <choice>
+ <value>1</value>
+ <value>0</value>
+ </choice>
+ </attribute>
+ </optional>
+ <empty/>
+ </element>
+ </zeroOrMore>
+ </element>
+ </optional>
</element>
element-conflicts?,
element-obsoletes?,
element-requires?,
+ element-recommends?,
+ element-suggests?,
element-file*
empty
}*
+element-suggests =
+ element suggests { suggests }
+
+suggests =
+ element entry {
+ attribute-name,
+ (
+ shared-entry-attributes,
+ attribute flags { "EQ" | "LE" | "GE" | "LT" | "GT" }
+ )?,
+ attribute pre { "1" | "0" }?,
+ empty
+ }*
+
+element-recommends =
+ element recommends { recommends }
+
+recommends =
+ element entry {
+ attribute-name,
+ (
+ shared-entry-attributes,
+ attribute flags { "EQ" | "LE" | "GE" | "LT" | "GT" }
+ )?,
+ attribute pre { "1" | "0" }?,
+ empty
+ }*
+
element-file =
element ns1:file { file }
<optional>
<ref name="element-requires"/>
</optional>
+ <optional>
+ <ref name="element-recommends"/>
+ </optional>
+ <optional>
+ <ref name="element-suggests"/>
+ </optional>
<zeroOrMore>
<ref name="element-file"/>
</zeroOrMore>
</element>
</zeroOrMore>
</define>
+ <define name="element-suggests">
+ <element name="suggests">
+ <ref name="suggests"/>
+ </element>
+ </define>
+ <define name="suggests">
+ <zeroOrMore>
+ <element name="entry">
+ <ref name="attribute-name"/>
+ <optional>
+ <ref name="shared-entry-attributes"/>
+ <attribute name="flags">
+ <choice>
+ <value>EQ</value>
+ <value>LE</value>
+ <value>GE</value>
+ <value>LT</value>
+ <value>GT</value>
+ </choice>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="pre">
+ <choice>
+ <value>1</value>
+ <value>0</value>
+ </choice>
+ </attribute>
+ </optional>
+ <empty/>
+ </element>
+ </zeroOrMore>
+ </define>
+ <define name="element-recommends">
+ <element name="recommends">
+ <ref name="recommends"/>
+ </element>
+ </define>
+ <define name="recommends">
+ <zeroOrMore>
+ <element name="entry">
+ <ref name="attribute-name"/>
+ <optional>
+ <ref name="shared-entry-attributes"/>
+ <attribute name="flags">
+ <choice>
+ <value>EQ</value>
+ <value>LE</value>
+ <value>GE</value>
+ <value>LT</value>
+ <value>GT</value>
+ </choice>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="pre">
+ <choice>
+ <value>1</value>
+ <value>0</value>
+ </choice>
+ </attribute>
+ </optional>
+ <empty/>
+ </element>
+ </zeroOrMore>
+ </define>
<define name="element-file">
<element name="ns1:file">
<ref name="file"/>