Topic: Adding DOCTYPE to XSL for output to XHTML file (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=25222" title="Pages that link to Topic: Adding DOCTYPE to XSL for output to XHTML file (Page 1 of 1)" rel="nofollow" >Topic: Adding DOCTYPE to XSL for output to XHTML file <span class="small">(Page 1 of 1)</span>\

 
Blaise
Bipolar (III) Inmate

From: London
Insane since: Jun 2003

posted posted 03-09-2005 16:17

Hi there guys, it's been a while since i've asked a question on the Asylum, but here goes...

I've got an XML file, an XSL file and this transforms the XML to a htm.

I want my htm to have the correct doctype declaration at the top of the page for XHTML 1.0 Strict, however i can't find the correct method for adding it into the XSL.

can anyone shed any light on how to go about this, there's very little in the FAQs here to give me any clues, and searching didn't help me much either.

TIA,

Cheers,

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 03-09-2005 16:20

[quick_reply] you could well put the doctype declaration the XHTML output in a <[CDATA[ ... ]]> [/quick_reply]

Blaise
Bipolar (III) Inmate

From: London
Insane since: Jun 2003

posted posted 03-09-2005 16:25

Tried that but it always seems ot put &lt; and &gt; araound the doctype instead of the actual arrows

P.S: is it possible for someone to edit the name of the subject, it should read XSL instead of CSL

Blaise
Bipolar (III) Inmate

From: London
Insane since: Jun 2003

posted posted 03-09-2005 16:47

Alright alright, I've answered my own question it seems, (or course it's not easy for anyone else that may have looked at this as I didn't post any code, but hey :P )

I didn't have the <xslutput /> element set, but now having this...

code:
<xsl:output
method="html"
omit-xml-declaration="yes"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
indent="yes"/>

Will nicely remove the xml declaration from teh top of the page and set the DOCTYPE for me, i didn't realise there was even such a thing, how cool is that!

*Wonders how many time he's answered his own questions on the Asylum?*

Cheers Anyway poi, I hope this will be of use to someone in the future!

Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 03-15-2005 09:01

Consider the title edited.


Justice 4 Pat Richard



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu