Web Analytics Made Easy -
StatCounter display xml layout with xsl - CodingForum

Announcement

Collapse
No announcement yet.

display xml layout with xsl

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • display xml layout with xsl

    can anyone see why this wont load i am trying to generate a page that i can build a new xml file off of from my original xml

    heres the xsl
    Code:
    <?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="/">
      <html><head></head><body>
    <clientlist>
    <xsl:for-each select="clientlist/Table/line">
    <line>
    <xsl:for-each select="Cell">
    <Cell>
    <xsl:if test="@HRef">
    <link><xsl:value-of select="@HRef"/></link>
    </xsl:if>
    <xsl:if test="Data">
    <xsl:choose>
    <xsl:when test="Data/@Type='String'">
    <Client><xsl:value-of select="Data"/></Client>
    </xsl:when>
    <xsl:otherwise>
    <xsl:if test="Data/@Type='Number'">
    <Control><xsl:value-of select="Data"/></Control>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:if>
    <product>fsa</product>
    </Cell>
    </xsl:for-each>
    </line>
    </xsl:for-each>
     </clientlist>
    </body>
    </html>
    and some xml entries
    Code:
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="clientlayout.xsl"?>
     <clientlist>
      <Table>
          <line Height="25.5">
        <Cell StyleID="s90" HRef="url"><Data
          Type="String">ACF Industries</Data></Cell>
        <Cell StyleID="s91" HRef="url"><Data
          Type="Number">21087</Data></Cell>
        <Cell StyleID="s92" HRef="url"><Data
          Type="String">Main Line Health </Data><NamedCell Name="M"/></Cell>
        <Cell StyleID="s92" HRef="url"><Data
          Type="Number">10080</Data></Cell>
       </line>
       <line Height="89.25">
        <Cell StyleID="s90" HRef="url"><Data
          Type="String">AERA ENERGY</Data><NamedCell Name="A"/></Cell>
        <Cell StyleID="s91" HRef="url"><Data
          Type="Number">10167</Data></Cell>
        <Cell StyleID="s92" HRef="url"><Data
          Type="String">Maryland National Capital Park and Planning Commision&#160;</Data></Cell>
        <Cell StyleID="s92" HRef="url"><Data
          Type="Number">10030</Data></Cell>
       </line>
       <line Height="102">
        <Cell StyleID="s90" HRef="url"><Data
          Type="String">AGERE SYSTEMS </Data></Cell>
        <Cell StyleID="s91" HRef="url"><Data
          Type="Number">10763</Data></Cell>
        <Cell StyleID="s93"><Data Type="String">Massachusett Peer Review Organization &#160;(Mass Pro)</Data></Cell>
        <Cell StyleID="s93"><Data Type="Number">18662</Data></Cell>
       </line>
    </Table>
    </clientlist>
Working...
X