summaryrefslogtreecommitdiffstats
path: root/sudoers/policy_metadata.rng
diff options
context:
space:
mode:
Diffstat (limited to 'sudoers/policy_metadata.rng')
-rw-r--r--sudoers/policy_metadata.rng31
1 files changed, 17 insertions, 14 deletions
diff --git a/sudoers/policy_metadata.rng b/sudoers/policy_metadata.rng
index 5deb0e8..810d32c 100644
--- a/sudoers/policy_metadata.rng
+++ b/sudoers/policy_metadata.rng
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
-<element name="metadata"
-xmlns="http://relaxng.org/ns/structure/1.0"
+<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
xmlns:a="http://freeipa.org/xml/rng/ns/annotations/1.0"
xmlns:ui="http://freeipa.org/xml/rng/ns/ui/1.0">
+<define name="policy_metadata">
+<element name="metadata">
+
<a:doc>The metadata information should be generic for all policies. The RelaxNG schema can be found in a separate file (this file :) and can be included by the schema file of a specific policy with the externalRef pattern. With this separation the policy and the metadata schema can be modified independently and the metadata schema can be used by the UI to render a separate page for the metadata of a policy.</a:doc>
<element name="name">
@@ -21,14 +23,17 @@ xmlns:ui="http://freeipa.org/xml/rng/ns/ui/1.0">
<text/>
</element>
- <element name="neededAssociation" ui:label="What kind of association is needed">
- <choice>
- <value ui:label="Host only">host</value>
- <value ui:label="User only">user</value>
- <value ui:label="Host and User">hostAndUser</value>
- </choice>
+ <element name="RNGfile" ui:label="Name of the RELAX NG file">
+ <a:doc>should be added automatically from RelaxNG metadata</a:doc>
+ <ref name="rng_filename"/>
+ </element>
+
+ <element name="XSLTfile" ui:label="Name of the XSLT file">
+ <a:doc>should be added automatically from RelaxNG metadata</a:doc>
+ <ref name="xslt_filename"/>
</element>
+<optional>
<element name="mergeStrategyXML" ui:label="Howto merge with other policies">
<choice>
<value ui:label="Use only this policy">exclusive</value>
@@ -45,13 +50,11 @@ xmlns:ui="http://freeipa.org/xml/rng/ns/ui/1.0">
</choice>
</element>
- <element name="XSLTfile" ui:label="Name of the XSLT file">
- <a:doc>should be added automatically from RelaxNG metadata</a:doc>
- <text/>
- </element>
-
<element name="description" ui:label="Description, what should the policy do and why, maybe a changelog">
<text/>
- <element>
+ </element>
+</optional>
</element>
+</define>
+</grammar>