Subject: Re: [xsl] x-schema in source xml causing no matches... From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx> Date: Wed, 21 Jul 2004 09:56:11 +0100 |
Hi Warren, > To follow up further, the most pressing question on the list below > is why xml spy is telling me that my xslt document isn't valid. Here > is an xslt that it complains about. Note that if you remove the > 'src' namespace declaration, then xml spy is perfectly happy with > it. Are you trying to validate the XSLT stylesheet in XML Spy in the same way you do with other XML documents? I suggest that you don't bother doing that: checking an XSLT stylesheet's validity against a DTD or schema will only point out some of the many errors that you might make, so it's better to check the stylesheet by running it and seeing what the XSLT processor tells you. In this case, my guess would be that XML Spy's validator is picking up on the namespace declaration and trying to validate the stylesheet against the schema that it indicates, which is causing errors because the stylesheet obviously isn't valid against that schema. I can't see anything in your stylesheet that would cause problems otherwise. Note that you should be using the src prefix when matching the <dt_application> element, as in: <xsl:template match="src:dt_application" name="dtApplication"> ... </xsl:template> and that if you want the generated <dt_application> element to be in that namespace, you should probably copy it with <xsl:copy> rather than creating a new one. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] x-schema in source xml ca, Wright, Warren | Thread | RE: [xsl] x-schema in source xml ca, Mike Ferrando |
RE: [xsl] x-schema in source xml ca, Michael Kay | Date | Re: [xsl] Easy way to convert XSL/H, G. Ken Holman |
Month |