Sign Up! Login: Password: New User? Forgot? Support
Top Mods!
Wowhead Search
by sonofsamedi
Digital Clock
by Wolfar15
Admin Forums
Welcome to the GuildPortal Help Community! These forums are for admin-to-admin help.
Available Forums
Deleted User (New Admin) 9/29/2003 4:58 PM EST : XML Code help

Deleted User
Posts: 0

Hi.
Where do I get the XML code for Morgan LeFay server keep status?

Thanks
TopBottom

Deleted User (New Admin) 9/29/2003 5:49 PM EST : RE: XML Code help

Deleted User
Posts: 0

TopBottom

Deleted User (New Admin) 9/29/2003 9:37 PM EST : RE: XML Code help

Deleted User
Posts: 0

Thank you, Cicalla.
Now if I want to show who has what keep and who has DF, I need to learn XSL path and input it in the XML/XSL Transformation?
TopBottom

Cedricke (New Admin) 1/19/2004 10:37 AM EST : RE: XML Code help
Cedricke
Posts: 745
Zomgawsh Poster

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl:template match="server_status" name="Morgan">
<html>
<body vlink="#FFFFE0" link="#FFFFE0">
 <table border="0" bgcolor="black" align="center" cellpadding="2" cellspacing="2" width="300px">
  <xsl:apply-templates>
   <xsl:sort select="@name" order="descending"/>
  </xsl:apply-templates>
 </table>
 <table border="0" bgcolor="black" align="center" cellpadding="0" cellspacing="0" width="300px">
  <tr>
   <td colspan="3" align="center">
    <font face="verdana" size="1" color="white"><b>COLOR KEY</b></font>
   </td>
  </tr>
  <tr>
   <td bgcolor="#8D0012" align="center" width="30%">
    <font face="verdana" size="1" color="white"><b>Albion</b></font>
   </td>
   <td bgcolor="#095091" align="center" width="30%">
    <font face="verdana" size="1" color="white"><b>Midgard</b></font>
   </td>
   <td bgcolor="#476600" align="center" width="30%">
    <font face="verdana" size="1" color="white"><b>Hibernia</b></font>
   </td>
  </tr>
 </table>
</body>
</html>
</xsl:template>
<xsl:template match="server_status/server" name="Morgan_Detail">
 <xsl:if test="@name='Morgan'">
  <tr>
   <td colspan="2" align="center">
    <font face="verdana" size="2" color="white"><b>MORGAN</b> - RELIC STATUS</font>
   </td>
  </tr>
  <xsl:for-each select="relic">
    <xsl:variable name="color_owner">   
    <xsl:choose>
        <xsl:when test="owner='Albion'">#8D0012</xsl:when>
        <xsl:when test="owner='Midgard'">#095091</xsl:when>
        <xsl:when test="owner='Hibernia'">#476600</xsl:when>
    </xsl:choose>
   </xsl:variable>
    <xsl:variable name="color_realm">   
    <xsl:choose>
        <xsl:when test="@realm='Albion'">#8D0012</xsl:when>
        <xsl:when test="@realm='Midgard'">#095091</xsl:when>
        <xsl:when test="@realm='Hibernia'">#476600</xsl:when>
    </xsl:choose>
   </xsl:variable>
    <xsl:variable name="relic_type"> 
    <xsl:choose>
        <xsl:when test="@type='Melee'">STR</xsl:when>
        <xsl:when test="@type='Magic'">PWR</xsl:when>
    </xsl:choose>
   </xsl:variable>
    <xsl:variable name="realm_type"> 
    <xsl:choose>
        <xsl:when test="@realm='Albion'">ALB</xsl:when>
        <xsl:when test="@realm='Midgard'">MID</xsl:when>
        <xsl:when test="@realm='Hibernia'">HIB</xsl:when>
    </xsl:choose>
   </xsl:variable>
   <tr>
     <td align="center" bgcolor="{$color_owner}" colspan="2">
     <font face="verdana" size="1" color="white">
     <xsl:value-of select="@name"/> (<xsl:value-of select="$realm_type"/>-<xsl:value-of select="$relic_type"/>)
     </font>
    </td>
   </tr>
  </xsl:for-each>
<tr>
   <td colspan="2" align="center">
    <font face="verdana" size="2" color="white"><b>MORGAN</b> - KEEP STATUS</font>
   </td>
  </tr>
  <tr>
   <td align="center">
    <font face="verdana" size="1" color="white"><i>KEEP NAME</i></font>
   </td>
   <td align="center">
    <font face="verdana" size="1" color="white"><i>HELD BY</i></font>
   </td>
  </tr>
  <xsl:for-each select="keep">
    <xsl:variable name="color_owner">   
    <xsl:choose>
        <xsl:when test="owner='Albion'">#8D0012</xsl:when>
        <xsl:when test="owner='Midgard'">#095091</xsl:when>
        <xsl:when test="owner='Hibernia'">#476600</xsl:when>
    </xsl:choose>
   </xsl:variable>
    <xsl:variable name="color_realm">   
    <xsl:choose>
        <xsl:when test="@realm='Albion'">#8D0012</xsl:when>
        <xsl:when test="@realm='Midgard'">#095091</xsl:when>
        <xsl:when test="@realm='Hibernia'">#476600</xsl:when>
        <xsl:when test="@realm='Neutral'">#6A0077</xsl:when>
    </xsl:choose>
   </xsl:variable>
    <xsl:variable name="url">
     <xsl:value-of select="claimant_heraldurl"/>
    </xsl:variable> 
   <xsl:if test="@realm='Neutral'">
    <tr>
      <td colspan="2"  align="center" bgcolor="{$color_owner}">
      <font face="verdana" size="1" color="white">
      <xsl:value-of select="@name"/>
      </font>
     </td>
    </tr>
   </xsl:if>
   <xsl:if test="@realm!='Neutral'">
    <tr>
      <td align="center" bgcolor="{$color_owner}">
      <font face="verdana" size="1" color="white">
      <xsl:value-of select="@name"/>
      </font>
     </td>
      <td align="center" bgcolor="{$color_owner}">
      <font size="1">
      <a href='{$url}'>
      <xsl:value-of select="claimant"/>
      </a>
      </font>
     </td>
    </tr>
   </xsl:if>
  </xsl:for-each>
  <tr>
   <td colspan="2" wide="100%">
   <hr/>
   </td>
  </tr>
  <xsl:for-each select="@lastguildupdate">
   <tr>
     <td align="center" colspan="2">
     <font face="verdana" size="1" color="white">
      Last Updated: <xsl:value-of select="."/>
     </font>
    </td>
   </tr>
  </xsl:for-each>
 </xsl:if>
  </xsl:template>
</xsl:stylesheet>


Note: This XSL provides an output for both Relics and Keeps for Morgan le Fay. If you have any questions, just drop me an IM.

You can find more of our transforms at our website.
TopBottom

Admins Online
There are   members online.
So-and-so has logged on!
%title%
%message%