[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
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|