← Prev in month
← Prev in thread
Next in thread →
Next in month →
RE: [docbook-apps] Any way to keep <!DOCTYPE...> definition int o utput ofXSLT transformation?
What I want is to write out <!ENTITY...> declarations within a <!DOCTYPE declaration. For example: <!DOCTYPE chapter SYSTEM "c:/docbook/4.2/docbookx.dtd" [ <!ENTITY % global_entities SYSTEM "c:/mydoc/myentities.ent"> %global_entities; ]> So according's Jeff's suggestion, the basic idea should be to write: <xsl:output method="xml" doctype-system="<!DOCTYPE chapter SYSTEM "c:/docbook/4.2/docbookx.dtd" [<!ENTITY % global_entities SYSTEM "c:/mydoc/myentities.ent">%global_entities;]>"</xsl:output> But of course, I need to escpae the double-quotes and other special characters within the doctype-system attribute. How can I escape such a long DOCTYPE declaration within a single attribute? Isn't there length a limit to the length of a string attribute in XML as well? Taro Jeff Beal <> wrote on 07/25/2003 03:08:37 PM: > Use the doctype-public and doctype-system attributes of the xsl:output > element. > > e.g., > <xsl:output method="xml" > doctype-public="-//OASIS//DTD DocBook v4.2 XML//EN" > doctype-system="http://www.oasis-open.org/docbook/dtd..."/> > > Jeff Beal > > > -----Original Message----- > > From: Taro Ikai [mailto:] > > Sent: Friday, July 25, 2003 2:51 PM > > To: > > Subject: [docbook-apps] Any way to keep <!DOCTYPE...> definition int > > output of XSLT transformation? > > > > > > I'm using XSL to transform a not-so-valid Docbook document > > into a valid > > Docbook document. > > > > The not-so-valid document starts with a correct <!DOCTYPE > > ...> definition > > for Docbook. > > > > When I run this document through XSLT (xsltproc program to be > > exact), the > > DOCTYPE definition > > gets erased. > > > > Is there a way to keep the DOCTYPE definition in the output XML file? > > > > The only other alternative I can think of is to use > > <xsl:text> and print > > the DOCTYPE > > definition at the beginning of the document. > > > > Taro > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > For additional commands, e-mail: > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > For additional commands, e-mail: >
← Prev in month
← Prev in thread
Next in thread →
Next in month →