[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

AW: AW: xml to xhtml namespace problem

Subject: AW: AW: xml to xhtml namespace problem
From: "Szabo, Patrick \(LNG-VIE\)" <patrick.szabo@xxxxxxxxxxxxx>
Date: Tue, 11 Jan 2011 11:53:00 +0100
AW: AW:  xml to xhtml namespace problem
Nice...works fine.

Thanks everybody !


. . . . . . . . . . . . . . . . . . . . . . . . . .
Patrick Szabo
 XSLT-Entwickler
LexisNexis
Marxergasse 25, 1030 Wien

mailto:patrick.szabo@xxxxxxxxxxxxx
Tel.: +43 (1) 534 52 - 1573
Fax: +43 (1) 534 52 - 146


-----UrsprC<ngliche Nachricht-----

Von: Imsieke, Gerrit, le-tex [mailto:gerrit.imsieke@xxxxxxxxx]
Gesendet: Dienstag, 11. JC$nner 2011 11:51
An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Betreff: Re: AW:  xml to xhtml namespace problem

Yes, the namespace that elements are created in depends on what is in
force in the current stylesheet. If you import a stylesheet whose
templates' purpose is to create HTML, you need to add xmlns=... there, too.

On 11.01.2011 11:46, Szabo, Patrick (LNG-VIE) wrote:
> Thanks for your answers...damn that was quick ;-)
>
> Unfortunately I get the same ouput as before.
>
> There are some other stylesheets included. Do I have to set the namespace in
all of them ?!
>
> regards
>
>
> . . . . . . . . . . . . . . . . . . . . . . . . . .
> Patrick Szabo
>   XSLT-Entwickler
> LexisNexis
> Marxergasse 25, 1030 Wien
>
> mailto:patrick.szabo@xxxxxxxxxxxxx
> Tel.: +43 (1) 534 52 - 1573
> Fax: +43 (1) 534 52 - 146
>
>
> -----UrsprC<ngliche Nachricht-----
>
> Von: Imsieke, Gerrit, le-tex [mailto:gerrit.imsieke@xxxxxxxxx]
> Gesendet: Dienstag, 11. JC$nner 2011 11:40
> An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Betreff: Re:  xml to xhtml namespace problem
>
> You need to specify xmlns="http://www.w3.org/1999/xhtml" for every HTML
> element that you create. (Or use xmlns="http://www.w3.org/1999/xhtml" in
> the xsl:stylesheet element.)
>
> -Gerrit
>
> On 11.01.2011 11:35, Szabo, Patrick (LNG-VIE) wrote:
>> Hi,
>>
>> I'm using Saxon 9 EE and xslt 2.0
>> I want to convert xml to xhtml.
>> Since we already had stylsheet that convert xml to html I just editet
>> the stylesheets a little bit.
>>
>> The problem is I can't give the html-tag the xhtml namespace.
>>
>> I have a template that creates the basic structure which looks like
>> this:
>>
>> <xsl:template match="/*">
>> 		<html xmlns="http://www.w3.org/1999/xhtml">
>> 			<head>
>> 				<title>
>> 					<xsl:value-of select="$path"/>
>> 					<xsl:text>   </xsl:text>
>> 					<xsl:value-of select="$file"/>
>> 				</title>
>>
>> 				<style type="text/css">
>> 					<![CDATA[
>>
>> 						@charset "utf-8";
>> 						@namespace
>> url("http://www.w3.org/1999/xhtml");
>>
>> 						/*
>> ********************************************* */
>> 						/* General Formatting
>> Rules	 */
>> 						/*
>> ********************************************* */
>>
>> 						body {
>> 							width: 730px;
>> 							margin-left:
>> 20px;
>> 						}
>>
>> 						....
>>
>> 						]]></style>
>> 			</head>
>> 			<body>
>> 				<!--
>> ===================================================================
>> -->
>> 				<!--  Document Text
>> -->
>> 				<!--
>> ===================================================================
>> -->
>> 				<div id="ID">
>> 					<xsl:apply-templates
>> select="*[local-name()!='bibliographie']"/>
>> 				</div>
>> 			</body>
>> 		</html>
>> </xsl:template>
>>
>> In the output document a lot of elements look like this:
>>
>> <h1 xmlns="">...</h1>
>>
>> How can I get rid of that empty namespace ?!
>>
>> regards
>>
>> . . . . . . . . . . . . . . . . . . . . . . . . . .
>> Patrick Szabo
>>    XSLT-Entwickler
>> LexisNexis
>> Marxergasse 25, 1030 Wien
>>
>> mailto:patrick.szabo@xxxxxxxxxxxxx
>> Tel.: +43 (1) 534 52 - 1573
>> Fax: +43 (1) 534 52 - 146
>>
>

--
Gerrit Imsieke
GeschC$ftsfC<hrer / Managing Director
le-tex publishing services GmbH
Weissenfelser Str. 84, 04229 Leipzig, Germany
Phone +49 341 355356 110, Fax +49 341 355356 510
gerrit.imsieke@xxxxxxxxx, http://www.le-tex.de

Registergericht / Commercial Register: Amtsgericht Leipzig
Registernummer / Registration Number: HRB 24930

GeschC$ftsfC<hrer: Gerrit Imsieke, Svea Jelonek,
Thomas Schmidt, Dr. Reinhard VC6ckler

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.