[xml] basefont issue with xsltproc?



<version-stuff>
yo:/export/home/davids/style $ xsltproc --version
Using libxml 20421, libxslt 10018 and libexslt 709
xsltproc was compiled against libxml 20421, libxslt 10018 and libexslt 709
libxslt 10018 was compiled against libxml 20421
libexslt 709 was compiled against libxml 20421
</version-stuff>

I have a doc:

<?xml version="1.0" encoding="iso-8859-1"?>
<patdoc cy="US" dnum="06212779" date="20010410" kind="B1">
  <sdobi>
    <b100>
      <b110>06212779</b110>
      <b130>B1</b130>
      <b140>
        <date>20010410</date>
      </b140>
      <b190>US</b190>
    </b100>
  </sdobi>
</patdoc>

and a test.xsl:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
 <xsl:output method="html" indent="yes" omit-xml-declaration="yes"
            doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN"/>
 <xsl:preserve-space elements="*"/>

<xsl:template match="/">
  <html>
   <body bgcolor="#ffffff" text="#000000">
    <xsl:apply-templates />
     <basefont face="Arial Unicode MS, Lucida Sans Unicode, Times New Roman"
size="2">
      <xsl:apply-templates/>
    </basefont>
   </body>
  </html>
 </xsl:template>
</xsl:stylesheet>

my result is:

yo:/export/home/davids/style $ xsltproc --verbose test.xsl 06212779_.xml.1
2>log
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>Test HTML</title>
</head>
<body bgcolor="#ffffff" text="#000000">


      06212779
      B1

        20010410

      US


<basefont face="Arial Unicode MS, Lucida Sans Unicode, Times New Roman"
size="2">
</body>
</html>

Notice that the "data" is only output once even though I apply-templates
twice. Looking at the "verbosity" log:

<snip inside="body"/>
xsltApplyOneTemplate: copy node body
xsltApplyTemplates: list of 1 nodes
xsltProcessOneNode: no template found for patdoc
xsltDefaultProcessOneNode: copy text

xsltProcessOneNode: no template found for sdobi
xsltDefaultProcessOneNode: copy text

xsltProcessOneNode: no template found for b100
xsltDefaultProcessOneNode: copy text

xsltProcessOneNode: no template found for b110
xsltDefaultProcessOneNode: copy text 06212779
xsltDefaultProcessOneNode: copy text

xsltProcessOneNode: no template found for b130
xsltDefaultProcessOneNode: copy text B1
xsltDefaultProcessOneNode: copy text

xsltProcessOneNode: no template found for b140
xsltDefaultProcessOneNode: copy text

xsltProcessOneNode: no template found for date
xsltDefaultProcessOneNode: copy text 20010410
xsltDefaultProcessOneNode: copy text

<snip inside="basefont"/>
xsltApplyOneTemplate: copy node basefont
xsltApplyOneTemplate: copy node div
xsltApplyTemplates: list of 1 nodes
xsltProcessOneNode: no template found for patdoc
xsltDefaultProcessOneNode: copy text

xsltProcessOneNode: no template found for sdobi
xsltDefaultProcessOneNode: copy text

xsltProcessOneNode: no template found for b100
xsltDefaultProcessOneNode: copy text

xsltProcessOneNode: no template found for b110
xsltDefaultProcessOneNode: copy text 06212779
xsltDefaultProcessOneNode: copy text

xsltProcessOneNode: no template found for b130
xsltDefaultProcessOneNode: copy text B1
xsltDefaultProcessOneNode: copy text

xsltProcessOneNode: no template found for b140
xsltDefaultProcessOneNode: copy text

xsltProcessOneNode: no template found for date
xsltDefaultProcessOneNode: copy text 20010410
xsltDefaultProcessOneNode: copy text


The data seems like it is added to result tree but not output...? Am I going
crazy?

Thanks for any help.

David





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]