aspose file tools*
The moose likes XML and Related Technologies and the fly likes XSL Doctype Declaration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSL Doctype Declaration" Watch "XSL Doctype Declaration" New topic
Author

XSL Doctype Declaration

Brian R. Wainwright
Ranch Hand

Joined: Aug 12, 2003
Posts: 92
Hey guys,

I'm writing a XSL stylesheet that needs to create a DOCTYPE declaration like this:



So far, I've written the following, which successfully generates everything except the ENTITY part...



Results in...


I admit my XSLT skills are lacking... but for the life of me I can't find any info anywhere on how to do this. Any help is appreciated! This is killing me!
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18127
    
    8

I dunno... your XSLT skills must be pretty good if you are managing to get instances of those entities to appear in the output document. So, I think this article answers your question and should be easy for you to follow.
Brian R. Wainwright
Ranch Hand

Joined: Aug 12, 2003
Posts: 92
Thanks for the kudos Paul! I know enough to get suckered into doing things like this! I had read that article already and it didn't quite seem like what I wanted to do, so I ended up using <xsl:text> tags to write out the DOCTYPE declaration manually. This made more sense since some fo the info I had in the <!ENTITY> declarations I needed to generate would have to be retrieved on the fly. For anyone interested, as far as I could find out, you can't do this any other way. Here's what I did....

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XSL Doctype Declaration
 
Similar Threads
DTD
Generate Entity java
Inserting node in XMl and retaining doc type information
How to get relative path specified in Entity declaration in DTD?
Generating XSL from JSP/XSL