We've been experimenting with different ways of managing
mac_permissions.xml for different devices/configurations and have come
up with using xslt to union signer stanza's. The idea is to remove the
exclusion of mac_permissions from unioning, and then apply this xslt, so
signer stanzas with the same key will be merged together.
This currently works with xsltproc, which works for our purposes, but is
not in the AOSP tree. If this is something the community sees as useful
then we can work to get it into a form that works for AOSP:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="utf-8" omit-xml-declaration="no" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:key name="signerKey" match="signer"
use="@signature"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="signer"/>
<xsl:template match=
"signer
[generate-id()
=
generate-id(key('signerKey',@signature)[1])
]">
<xsl:copy>
<xsl:apply-templates select=
"@*|key('signerKey', @signature)/node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="tmproot | policy">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="/">
<policy>
<xsl:apply-templates/>
</policy>
</xsl:template>
</xsl:stylesheet>
_______________________________________________
Seandroid-list mailing list
[email protected]
To unsubscribe, send email to [email protected].
To get help, send an email containing "help" to
[email protected].