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

Re: x-schema in source xml causing no matches...

Subject: Re: x-schema in source xml causing no matches...
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 21 Jul 2004 09:56:11 +0100
xml spy 2004 errors
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

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.