xsl-list
[Top] [All Lists]

RE: My stylesheet not finding nodes

2003-08-05 15:31:32
Perhaps your DTD contains one of those sneaky default attributes that
changes the default namespace.

Incidentally you are using filenames liberally in places where XML
requires URIs. Some parsers will let you get away with it, but they
shouldn't: it's wrong.

Michael Kay

-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of 
John Sturman
Sent: 05 August 2003 21:15
To: XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] My stylesheet not finding nodes


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



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



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