aspose file tools*
The moose likes XML and Related Technologies and the fly likes How to emit doctype from xsl? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to emit doctype from xsl?" Watch "How to emit doctype from xsl?" New topic
Author

How to emit doctype from xsl?

Siegfried Heintze
Ranch Hand

Joined: Aug 11, 2000
Posts: 376
I'm trying to create an xslt that will mimic the SVG produced by adobe illustrator.

What XSL tags would I use to emit that funky doctype tag?
Can XSL also emit XML comments?

Thanks,
Siegfried

Sample from Adobe:
<blockquote>code:
<pre name="code" class="core">
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="1192.203px" height="1060.515px" viewBox="0 0 1192.203 1060.515" enable-background="new 0 0 1192.203 1060.515"
xml:space="preserve">
<g id="BLOCK_x5F_RECORD_3_">
</pre>
</blockquote>
Carey Evans
Ranch Hand

Joined: May 27, 2008
Posts: 225

See http://www.w3.org/TR/xslt#output and http://www.w3.org/TR/xslt#section-Creating-Comments.

The first quoted part of the DOCTYPE is set by doctype-public, the second by doctype-system.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18121
    
    8

And yes, there's an <xsl:comment> element in XSLT.
Siegfried Heintze
Ranch Hand

Joined: Aug 11, 2000
Posts: 376
Thanks! That works!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to emit doctype from xsl?
 
Similar Threads
Error While Creating Custom Tags
converting html to pdf
Append Child node in DOM
JBoss EAR structure
Why does XSLT insert xmlns=""?