Topic: Adding DOCTYPE to XSL for output to XHTML file 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" rel="nofollow" >Topic: Adding DOCTYPE to XSL for output to XHTML file\

 
Author Thread
Blaise
Bipolar (III) Inmate

From: London
Insane since: Jun 2003

IP logged posted posted 03-09-2005 16:17 Edit Quote

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

IP logged posted posted 03-09-2005 16:20 Edit Quote

[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

IP logged posted posted 03-09-2005 16:25 Edit Quote

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

IP logged posted posted 03-09-2005 16:47 Edit Quote

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

IP logged posted posted 03-15-2005 09:01 Edit Quote

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