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

RE: convert xml with schema to html with xslt

Subject: RE: convert xml with schema to html with xslt
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 21 Dec 2009 10:35:36 -0000
RE:  convert xml with schema to html with xslt
> 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. 

How did it fail?

> If i remove the schema declaration the conversion is fine.
> Please suggest me how to correct this. 

Are you using Altova's XSLT processor by any chance? This appears to use the
presence of xsi:schemaLocation as a signal to perform schema validation.
When I last looked, I couldn't find any way of overriding this behaviour.

> 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" />

How did it fail when you added the xsl:import-schema?

<xsl:template name="paragraph" match="para">

In your source XML document, para is in a namespace so this rule won't match
anything. That's true regardless whether you validate against the schema or
not. But perhaps when you tried without the xsi:schemaLocation, you removed
the default namespace declaration as well? In which case this is just the
standard old elephant trap of matching elements in the default namespace,
and nothing to do with schemas at all.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 

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.