File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to emit doctype from xsl?

 
Siegfried Heintze
Ranch Hand
Posts: 403
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 225
Debian Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 20184
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And yes, there's an <xsl:comment> element in XSLT.
 
Siegfried Heintze
Ranch Hand
Posts: 403
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks! That works!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic