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

convert xml with schema to html with xslt

Subject: convert xml with schema to html with xslt
From: Lajos Joo <lajosjoo@xxxxxxxxx>
Date: Mon, 21 Dec 2009 02:21:06 -0800 (PST)
 convert xml with schema to html with xslt
Hello!

I have a problem. I have a small xml file which has a schema declaration in the root element. I cannot convert it to html with an xslt file. If i remove the schema declaration the conversion is fine.
Please suggest me how to correct this. 
I have included a shcema import but it didnt help:
<xsl:import-schema namespace="urn:Verlag" schema-location="urn:Verlag http://192.168.190.181:8879/xml/STRUKTUR.xsd" />

The xml file looks like this:
<LOSCHNIGG xmlns="urn:Verlag" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:Verlag http://192.168.190.181:8879/xml/STRUKTUR.xsd">
	<metadaten>
		<gilt-ab>1000-01-01</gilt-ab>
		<gilt-bis>9999-12-31</gilt-bis>
		<Fassung_Publikation>
			<Publikationsstand>2009-12-19</Publikationsstand>
			<Release_Version>1</Release_Version>
		</Fassung_Publikation>
	</metadaten>
	<para>
text...
	</para>
</LOSCHNIGG>

The xml works fine and the xsd is in the right place.

The xsl looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="2.0">
    
<!--    <xsl:import-schema namespace="urn:Verlag" schema-location="urn:Verlag http://192.168.190.181:8879/xml/STRUKTUR.xsd" />-->

	<xsl:output encoding="UTF-8" indent="yes" method="html" version="1.0" />
		
	<xsl:template match="@*|node()">
	   <xsl:copy>
	      <xsl:apply-templates select="@*|node()"/>
	   </xsl:copy>
	</xsl:template>
	
		<xsl:template name="paragraph" match="para">
			<xsl:element name="p">
				<xsl:apply-templates/>
			</xsl:element>
		</xsl:template>

	<xsl:template match="/">
		<xsl:element name="html">
			<xsl:element name="head">
				<xsl:element name="title">Preview</xsl:element>
			</xsl:element>
			<xsl:apply-templates/>
		</xsl:element>
	</xsl:template>
</xsl:stylesheet>

Thank you!
Lajos

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.