diff options
author | Sumit Bose <sbose@nb.localdomain> | 2008-10-08 15:59:07 +0200 |
---|---|---|
committer | Sumit Bose <sbose@nb.localdomain> | 2008-10-08 15:59:07 +0200 |
commit | 94fec89320e4420fddad4c934876352c3452f97c (patch) | |
tree | 35707b3bfe5c2b080c8adba827b616a8f63c2122 | |
parent | 9765f5729bca58fd9bc57d315377ce143891d774 (diff) | |
download | ipa_policy-94fec89320e4420fddad4c934876352c3452f97c.tar.gz ipa_policy-94fec89320e4420fddad4c934876352c3452f97c.tar.xz ipa_policy-94fec89320e4420fddad4c934876352c3452f97c.zip |
updated xslt
-rw-r--r-- | sudoers/sudoers.rng | 5 | ||||
-rw-r--r-- | sudoers/sudoers.xslt | 30 |
2 files changed, 28 insertions, 7 deletions
diff --git a/sudoers/sudoers.rng b/sudoers/sudoers.rng index 9720a68..e15bca6 100644 --- a/sudoers/sudoers.rng +++ b/sudoers/sudoers.rng @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<grammar xmlns="http://relaxng.org/ns/structure/1.0" +<grammar ns="http://freeipa.org/xml/rng/sudo/sudoers/1.0" +xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:ui="http://freeipa.org/xml/rng/ns/ui/1.0"> @@ -17,7 +18,7 @@ xmlns:ui="http://freeipa.org/xml/rng/ns/ui/1.0"> <define name="xslt_filename"><value>sudoers.xslt</value></define> <include href="policy_metadata.rng"/> - <start> + <start ns="http://freeipa.org/xml/rng/sudo/sudoers/1.0"> <element name="ipa"> <a:documentation>Doc test.</a:documentation> diff --git a/sudoers/sudoers.xslt b/sudoers/sudoers.xslt index 933d93b..f33fc10 100644 --- a/sudoers/sudoers.xslt +++ b/sudoers/sudoers.xslt @@ -6,6 +6,7 @@ xmlns:sudoers="http://freeipa.org/xml/rng/sudo/sudoers/1.0"> <md:output_file name="/etc/sudoers" owner="root" group="root" permission="440"/> + <xsl:output method="text" indent="no"/> <xsl:strip-space elements="*"/> @@ -16,6 +17,12 @@ <xsl:template match="sudoers:ipa"> <xsl:apply-templates> + <xsl:with-param name="sudoers:ipaconfig"/> + </xsl:apply-templates> + </xsl:template> + + <xsl:template match="sudoers:ipaconfig"> + <xsl:apply-templates> <xsl:with-param name="sudoers:sudoers" select="''"/> </xsl:apply-templates> </xsl:template> @@ -25,18 +32,31 @@ </xsl:template> <xsl:template match="sudoers:sudoers"> + <xsl:variable name="name"> - <xsl:call-template name="format_name"> - <xsl:with-param name="name" select="@name"/> - <xsl:with-param name="type" select="@type"/> - </xsl:call-template> + <xsl:apply-templates select="sudoers:subject"> + </xsl:apply-templates> </xsl:variable> - <xsl:apply-templates select="sudoers:command"> + <xsl:apply-templates> + <!-- <xsl:apply-templates select="sudoers:command"> --> <xsl:with-param name="name" select="$name"/> </xsl:apply-templates> </xsl:template> + + + <xsl:template match="sudoers:subject"> + <xsl:call-template name="format_name"> + <xsl:with-param name="name" select="sudoers:name"/> + <xsl:with-param name="type" select="sudoers:type"/> + </xsl:call-template> + </xsl:template> + + <xsl:template match="sudoers:option"> + <xsl:text># found an option 

</xsl:text> + </xsl:template> + <xsl:template match="sudoers:command"> <xsl:param name="name"/> <xsl:variable name="command" select="sudoers:path"/> |