Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XSL Doctype Declaration

 
Brian R. Wainwright
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21315
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic