[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re[2]: xmlns="" ??

Subject: Re[2]: xmlns="" ??
From: Arthur Maloney <ArthurM@xxxxxxxxxx>
Date: Fri, 30 Apr 2004 11:37:53 +0100
xsl xmlns
Hello David ~ Manos,

Below is the full xml & xsl the meta's are in one of the lib files.
I create the table element in the xsl file. If I could fix it, the rest will be
no-problem.

Thanks for the comments Perhaps you could xplain a bit more.

  1 the XHTML namespace is not visible in other templates, thus
   unprefixed HTMLish elements are in the null namespace...

  2 The fix is to generate your table element in the xhtml namespace.



Structure of xml with one ticket:

<?xml version="1.0" encoding="ISO-8859-1"?>
<root xlmns="urn:seipas-com:ticket" number="Table 1.1a"
      title="Active Ticket Details"
      subhead="For Period: 2003-04-30 to 2004-04-29 (rolling year)"
      footnote="Calculated: 2004-04-29"
      caption-xaxis="" caption-yaxis="" created="2004-04-29T09:16:36">
      
        <ticket>
                <ticketId>7387</ticketId>
                <days>30</days>
                <solution-started>2004-03-30</solution-started>
                <support-time>0</support-time>
                <customer>James LongBottom Simpson</customer>
                <description>Laptop has non functional keys on keypad.</description>
                <agent>Fred Johnson</agent>
                <status>Waiting for someone</status>
        </ticket>
... repeats for each ticket.
</root>

   ------------
 
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<!--  Top level declarations -->
<xsl:import href="../xsl/libTemporal.xsl"/>
<xsl:import href="../xsl/libCSS.xsl"/>
<xsl:import href="../xsl/libTopBottom.xsl"/>
<xsl:output  method="xml" omit-xml-declaration="yes" indent="yes" />
        
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <head>
            <title>Ticket Report</title>
            <xsl:call-template name="meta"/>
            <xsl:call-template name="css-screen-table14"/>
      </head>
      <body>
         <xsl:apply-templates select="root"/>
         <tr>
          <td colspan="4" class="footnote"><sup>1</sup>Number of days outstanding.</td>
         </tr>
           <p class="b-head">Signed...........................(IT Manager)</p>
      </body>
</html>
</xsl:template>
                
        
<xsl:template match="root">
<xsl:element name="table">
             <caption>
                        <xsl:value-of select="@number"/>
                        <xsl:text>: </xsl:text>
                        <xsl:value-of select="@title"/>
                        <br />
                        <xsl:value-of select="@subhead"/>
             </caption>
             <thead>
                        <tr>
                                <th style="width: 60px; text-align: center;">No.</th>
                                <th style="width: 60px; text-align: right;">Days<sup>1</sup></th>
                                <th style="text-align: center;">Started</th>
                                <th style="width: 100px;">Customer</th>
                                <th>Description</th>
                                <th>Progress</th>
                                <th>Action</th>
                                <th>Assigned To</th>
                        </tr>
             </thead>
             <tbody>
                    <xsl:for-each select="ticket">
                                <tr>
                                        <td>
                                                <xsl:value-of select="./ticketId"/>
                                        </td>
                                        <td>
                                                <xsl:value-of select="format-number(days, '#,##0')"/>
                                        </td>
                                        <td>
                                                <xsl:value-of select="solution-started"/>
                                        </td>
                                        <td>
                                                <xsl:value-of select="./customer"/>
                                        </td>
                                        <td>
                                                <xsl:value-of select="./description"/>
                                        </td>
                                        <td>
                                                <xsl:value-of select="./progress"/>
                                        </td>
                                        <td>
                                                <xsl:value-of select="./action"/>
                                        </td>
                                        <td>
                                                <xsl:value-of select="./agent"/>
                                        </td>
                                </tr>
                    </xsl:for-each>
                </tbody>
             </xsl:element>
        </xsl:template>
</xsl:stylesheet>


-- 
Best regards,
 Arthur                            mailto:ArthurM@xxxxxxxxxx

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.