This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

DTD or no DTD?


There is a DTD at http://www.openebook.org/dtds/oeb-1.0/oebdoc1.dtd

I have a document headed

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "+//ISBN 0-9673008-1-9//DTD OEB 1.0 Document//EN" 
 "/sgml/oebook/oebook1.dtd">
<html>
 <head>

And a stylesheet which, after staring at it for an hour, I still
think is right.

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

>


 
<xsl:output  method="xml"   doctype-public="book// //EN"   doctype-system=
"booka.dtd"   encoding="utf-8"   indent="yes"/>

  <xsl:strip-space  elements="*"/>


  <xsl:template match="/">
    <book>
      <ver>Version 1.0</ver>
    <xsl:apply-templates/>
    </book>
  </xsl:template>


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



Problem.

With the document and stylsheet as given,
the html template never triggers.

If I remove the doctype from the document,
leaving it well formed, it triggers.

I'm almost sure its something totally stupid..
but I'd still like to know, if anyone can spot it,
or say why a document instance with a DTD is
treated differently to one without it.

Aside.
It validates with nsgmls -wxml
It operates the same in xt and Saxon.

Any hints appreciated.
DaveP






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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]