1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3 <xsl:output method="text" indent="no" omit-xml-declaration="yes"/>
7 xsltproc extract-IDL-permissions.xsl fm_IDL.xml|perl -e 'while(<>){s/^\s+(.*)\s+$/$1/o;print("$1\n")unless(/^\s*$/ || /\s+/)}'|sort -u|less
10 <xsl:template match="//permacrud:actions/*">
11 <xsl:if test="@permission">
12 <xsl:call-template name="output-tokens">
13 <xsl:with-param name="list"><xsl:value-of select="@permission"/></xsl:with-param>
18 <xsl:template name="output-tokens">
19 <xsl:param name="list" />
20 <xsl:variable name="newlist" select="normalize-space($list)" />
21 <xsl:variable name="first" select="substring-before($newlist, '|')" />
22 <xsl:variable name="remaining" select="substring-after($list, '|')" />
23 <xsl:choose test="$first">
24 <xsl:when test="$first">
25 <xsl:value-of select="$first" /><xsl:text>
27 <xsl:if test="$remaining">
28 <xsl:call-template name="output-tokens">
29 <xsl:with-param name="list" select="$remaining" />
34 <xsl:value-of select="$list" />