Friday, April 4, 2008

XSL style sheet for Windows 2003 xml-based AzMan Store

Anyone that says XML is a human-readable format is smoking crack. Take, for example the XML file used for Authorization Manager.
So, I was in need of a way to display all the Authorization Manager (AzMan) Roles,Tasks, and Operations in a readable format, so I went ahead and created a stylesheet that will do just that...using a XSL file (XML stylesheet)

and here it is...
------------------------------------------------------------

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="AzAdminManager">
<html>
<head>
<title>AzMan Roles</title>
<link type="text/css" rel="stylesheet" href="css.css"/>
</head>
<body>
AzMan Roles and Operations
<table border="1">
<tr><td><b>Operation Name</b></td><td><b>Description</b></td></tr>
<xsl:for-each select="AzApplication/AzOperation">
<tr>
<td><xsl:value-of select="@Name" /></td><td><xsl:value-of select="@Description" /></td>
</tr>
</xsl:for-each>
</table>
<table border="1">
<tr>
<td><b>Task\Role Name</b></td><td><b>Description</b></td>
</tr>
<xsl:for-each select="AzApplication/AzTask">
<tr>
<td><xsl:value-of select="@Name" /></td><td><xsl:value-of select="@Description" /></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

Not bad, ay?

3 comments:

Pen Drive said...

Hello. This post is likeable, and your blog is very interesting, congratulations :-). I will add in my blogroll =). If possible gives a last there on my blog, it is about the Pen Drive, I hope you enjoy. The address is http://pen-drive-brasil.blogspot.com. A hug.

david mckinney said...

good start...but whats missing is relating the roles to the tasks and operations....who can do what.

David McKinney said...

I did develop an xsl based on my above veiled criticism, but it won't let me post it :-( Let me know if I can send it to you.