Project

Profile

Help

There is no imported schema for namespace

Added by Anonymous about 14 years ago

Legacy ID: #8629235 Legacy Poster: https://www.google.com/accounts ()

Hello, I'm trying to use in my xslt: <xsl:if test=". castable as xsd:float"> but am getting the following error: There is no imported schema for namespace http://www.w3.org/2001/XMLSchema My namespace is defined as: xmlns:xsd="http://www.w3.org/2001/XMLSchema#" Any ideas on what I can do to get around this error? Thanks, Jeff


Replies (2)

RE: There is no imported schema for namespace - Added by Anonymous about 14 years ago

Legacy ID: #8629795 Legacy Poster: Michael Kay (mhkay)

You need to remove the trailing "#" sign from the XML schema namespace. Your confusion is caused, I think, by RDF, which does not use true XML namespaces and qualilified names, but rather its own system of CURIEs. In the RDF system, xsd:float is not a QName but a CURIE consisting of the concatenation of the string represented by prefix "xsd" and the suffix "float". Unlike RDF, the core XML standards including XSD and XSLT do not use CURIEs, but rather QNames in which the name is effectively a (uri, local-name) pair.

RE: There is no imported schema for namespace - Added by Anonymous about 14 years ago

Legacy ID: #8630051 Legacy Poster: https://www.google.com/accounts ()

Thanks, Works great now. And thanks for the explanation. You're right that I'm much more heavily versed in RDF than in general XML. Amazing how much time you can spend on the little idiosyncrasies like that. Jeff

    (1-2/2)

    Please register to reply