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

Re: replacing <!DOCTYPE> with <?xml-model?> in XSLT

Subject: Re: replacing <!DOCTYPE> with <?xml-model?> in XSLT
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 27 Jul 2022 21:16:22 -0000
Re:  replacing <!DOCTYPE> with <?xml-model?> in XSLT
On 27.07.2022 23:07, Chris Papademetrious
christopher.papademetrious@xxxxxxxxxxxx wrote:
>
>
> Given the following XML input:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
>
> <topic id="topic">
>
> B  <title>My Topic</title>
>
> </topic>
>
> I would like to replace <!DOCTYPE> with <?xml-model?>. With the following:
>
> <!-- remove the <!DOCTYPE> (works!) -->
>
> <xsl:output doctype-system=""/>
>
> <!-- add the <?xml-model?> (does not work) -->
>
> <xsl:template match="/*">
>
> B  <xsl:processing-instruction
> name="xml-model">href="urn:oasis:names:tc:dita:rng:topic.rng"
>
schematypens=http://relaxng.org/ns/structure/1.0</xsl:processing-instruction>
>
> B  <xsl:next-match/>
>
> </xsl:template>
>
> the <!DOCTYPE> removal works but the <?xml-model?> addition does not.
> Is there a trick to emitting a PI before the root element?
>

In which environment, what is the processor you are you trying? And what
happens if it doesn't work, any error?

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.