[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

lost the <!Doctype declaration in the transform...

Subject: lost the <!Doctype declaration in the transform...
From: "Ben Skelton" <ben_skelton@xxxxxxxxxxxxx>
Date: Wed, 7 Nov 2001 17:55:58 -0800
xml transform loses doctype

I'm taking one xml file and using a stylesheet to change some of the nodes
around. I'm using this to transform the xml page:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="xml" />
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="front">
<front>
<doctype><xsl:value-of select="doctype" /></doctype>
<DocumentNum><xsl:value-of select="docno" /></DocumentNum>
<DocumentTitle><xsl:value-of select="doctitle" /></DocumentTitle>
<SectionNum></SectionNum>
</front>
</xsl:template>
</xsl:stylesheet>

The xml file is:

<?xml version="1.0"?>
<!DOCTYPE xxxxxxxx SYSTEM "../../../../resources/BCGSTAND.DTD" [

<!-- Begin Document Specific Declarations -->


<!-- End Document Specific Declarations -->

]>
<front status = "approved" writer = "unknown" subject = "Construction,Welding"
keywords = "Weld Inspection">
<doctype>OPERATING INSTRUCTION</doctype>
<docno>CON 300&ndash;2</docno>
<section>CONSTRUCTION</section>
<approvaldate>17 February 1997</approvaldate>
<category>Welding</category>
<doctitle>Inspection of Welds
</doctitle>
<subjectexpert>Unknown</subjectexpert>
<docowner email = ""</docowner>
<replaces>none</replaces>
</front>


My output looks like this:

<?xml version="1.0"?><front><doctype>ADMINISTRATIVE
INSTRUCTION</doctype><DocumentNum>ADM 100?2</DocumentNum><DocumentTitle>Photo ID
Cards
</DocumentTitle><SectionNum></SectionNum><SectionName>ADMINISTRATION</SectionName><CategoryNum></CategoryNum><CategoryName>General

Administrative Services</CategoryName><SubCatNum></SubCatNum></front>

I seem to have lost the <!Doctype declaration in the transform...

How would I pass that information through??


Any help would be most appreciated - thanks :)

_Ben

---------------------------------
Ben M. Skelton
Habanero

604.709.6201 ext. 107
bskelton@xxxxxxxxxxxxx

Visit us on the web at our new website: http://www.habaneros.com
and check out our latest client success stories and career opportunities.



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.