Subject: Re: [xsl] How to select a document element from the input xml file using xslt? From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Mon, 12 Jul 2004 17:26:35 -0400 |
<xsl:include href="templates.xsl"/> <xsl:output method="xml" doctype-system="http://delete.dtd"/>
Cheers, Wendell
Hi Alla,
Your implementation is read by the xslt processor and when it comes across <xsl:output... it doesnt know that you want it to output <xsl:output... but instead assumes you are declaring the <xsl:output../> element. As you probably already know the <xsl:output element must be a direct child of <xsl:stylesheet...> and cannot be inside of a template or anywhere after the first xsl:template element is declared... The way to accomplish what you are trying to do is to use the <xsl:element name="xsl:output"> and then add the necessary attributes using <xsl:attribute name="method">xml</xsl:attribute> etc...
Hope this helps!
Belkin, Alla wrote:Hello, I am using a stylesheet for modifications of the input xml file to the different format of the xml file. My output file should have a document element, the same as in the input file. How to copy a document element? I can have input XMLs with different document elements. I tried to do something like this, but it doesn't work: <xsl:choose> <xsl:when test="count(//Delete) > 0"> <xsl:output method="xml" doctype-system="http://delete.dtd"/> </xsl:when > <xsl:when test="count(//Delete) = 0"> <xsl:output method="xml" doctype-system="http://update.dtd"/> </xsl:when> </xsl:choose> Please, help Thank you, Alla Belkin
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] How to select a document , George Cristian Bina | Thread | RE: [xsl] How to select a document , Belkin, Alla |
RE: [xsl] How to select a document , Belkin, Alla | Date | RE: [xsl] How to select a document , Belkin, Alla |
Month |