Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DOCTYPE Removed from xsl file?

Status
Not open for further replies.

JeffNolan1900

Technical User
Mar 21, 2007
26
US
Hello,
I have an xsl file.
Code:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE SOMEFilter SYSTEM "[URL unfurl="true"]http://www.webpage.com/xmldtd/SOMEFilter.dtd">[/URL]
<?xml-stylesheet type="text/xsl" href="[URL unfurl="true"]http://www.webpage.com/xmldtd/SOMEFilter.xslt"?>[/URL]
<xsl:stylesheet version="1.0" xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform"[/URL] xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:fx="#fx-functions" exclude-result-prefixes="msxsl fx">
<xsl:output method="xml" version="4.0" indent="yes" xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform"/>[/URL]
<xsl:template match="//dataroot" xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform">[/URL]
	
<SOMEFilter>
     <Features>
     	<xsl:for-each select="BentleySOMEfilter">
        <Feature>
           <KeyColumn> <xsl:value-of select="KEY_x0020_COLUMN" /></KeyColumn>
           <EntityTypeName><xsl:value-of select="ENTITY_x0020_TYPE_x0020_NAME" /></EntityTypeName>
        </Feature>
        </xsl:for-each>
     </Features>
</SOMEFilter>

</xsl:template>

</xsl:stylesheet>

It's output xml file looks like this:
Code:
<?xml version="1.0" encoding="UTF-16"?>
<SOMEFilter>
	<Features>
		<Feature>
			<KeyColumn>200633</KeyColumn>
				<EntityTypeName>Jimmy's Sausage</EntityTypeName>
		</Feature>
	</Features>
</SOMEFilter>

I want the top of the xml to look like this:
Code:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE SOMEFilter SYSTEM "[URL unfurl="true"]http://www.webpage.com/xmldtd/SOMEFilter.dtd">[/URL]
<?xml-stylesheet type="text/xsl" href="[URL unfurl="true"]http://www.webpage.com/xmldtd/SOMEFilter.xslt"?>[/URL]

But the xml looks like this, as seen in the xml code listed above?
Code:
<?xml version="1.0" encoding="UTF-16"?>

Question: How can I get the doctype from my xsl file to show up in my xml file, which is being created from scratch from an access database?

Like always, thanks...
Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top