xsl-list
[Top] [All Lists]

My stylesheet not finding nodes

2003-08-05 13:14:58
Hello all,

I am having a problem with my stylesheet in that certain templates are not being accessed at all. I can only assume that the xpath expression I am testing for is not being matched. For the life of me, I can't see what is wrong. I am attaching the top of my xml file and also the templates I am troubleshooting.


XML (this file consists of many (~80) html elements

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE meta_xhmtl SYSTEM "c:\DF\docframe.dtd" [
        <!-- Begin Document Specific Declarations -->
        <!NOTATION gif SYSTEM "">
        <!ENTITY img1 SYSTEM "c:\DF\pubfield.gif" NDATA gif>
        <!ENTITY img2 SYSTEM ".c:\DF\static.gif" NDATA gif>
        <!ENTITY img3 SYSTEM "c:\DF\pubmethod.gif" NDATA gif>
        <!ENTITY img4 SYSTEM "c:\DF\pubproperty.gif" NDATA gif>
        <!ENTITY img5 SYSTEM "c:\DF\protmethod.gif" NDATA gif>
        <!ENTITY img6 SYSTEM "c:\DF\\protproperty.gif" NDATA gif>
        <!-- End Document Specific Declarations -->
]>
<?xml-stylesheet href="c:\BK\msdn.css" type="text/css"?>
<meta_xhmtl>
        <html dir="LTR">
                <filename type="filename">filename here</filename>
                <body id="bodyID" class="dtBODY">
                        <div id="nsbanner">
                                <div id="TitleRow">
                                        <h1 class="dtH1">Some text here</h1>

XSLT

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; xmlns:saxon="http://icl.com/saxon";> <xsl:output method="xml" omit-xml-declaration="yes" version="1.0" encoding="UTF-8" indent="no" />

   <xsl:template match="/">
      <xsl:apply-templates />
   </xsl:template>

   <xsl:template match="node() | @*">
<!-- <xsl:message>identity template</xsl:message> -->
      <xsl:copy>
         <xsl:apply-templates select="node() | @*" />
      </xsl:copy>
   </xsl:template>

   <xsl:variable name="dir">c:\temp\htmls</xsl:variable>

   <xsl:template match="/meta_xhmtl/html">
      <xsl:variable name="filename">
         <xsl:value-of select="filename" />
      </xsl:variable>

      <saxon:output href="{$dir}\{$filename}.html">
...


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>