[R] XMLSchema:::processSchemaTypes() fails with XMLSchema.xsd [was: SSOAP fails with .types[[1]] : subscript out of bounds]
Steffen Neumann
sneumann at ipb-halle.de
Tue Jun 22 10:59:14 CEST 2010
Hi again,
On Tue, 2010-06-22 at 10:02 +0200, Steffen Neumann wrote:
> So, if XMLSchema:::processSchemaTypes() does not find
> any custom/embedded type definitions, is it possibe to "inject" those
> from the http://www.w3.org/2001/XMLSchema.xsd
> into genSOAPClientInterface() instead ?
Well, it's not possible, at least for me.
This is as far as I got, any help appreciated:
Thanks in advance,
yours,
Steffen
xsd = XMLSchema:::parseSchemaDoc("http://www.w3.org/2001/XMLSchema.xsd")
root = xmlRoot(xsd)
types = XMLSchema:::processSchemaTypes(root, root, verbose = TRUE)
traceback()
> xsd = XMLSchema:::parseSchemaDoc("http://www.w3.org/2001/XMLSchema.xsd")
> root = xmlRoot(xsd)
> types = XMLSchema:::processSchemaTypes(root, root, verbose = TRUE)
processing (sub) schema http://www.w3.org/XML/1998/namespace
2 ) lang ( attribute )
3 ) space ( attribute )
4 ) base ( attribute )
5 ) id ( attribute )
6 ) specialAttrs ( attributeGroup )
5 ) openAttrs ( complexType )
6 ) annotated ( complexType )
7 ) schemaTop ( group )
8 ) redefinable ( group )
9 ) formChoice ( simpleType )
10 ) reducedDerivationControl ( simpleType )
11 ) derivationSet ( simpleType )
Error in validObject(.Object) :
invalid class "RestrictedListType" object: invalid object for slot "name" in class "RestrictedListType": got class "NULL", should be or extend class "character"
In addition: Warning messages:
1: In processAttribute(type, name) :
<fixme> Skipping children in <attribute> definition
2: In processAttribute(type, name) :
<fixme> Skipping children in <attribute> definition
>
> traceback()
12: stop(msg, " ", errors, domain = NA)
11: validObject(.Object)
10: initialize(value, ...)
9: initialize(value, ...)
8: new("RestrictedListType", name = name, elType = elType, elementType = type)
7: processSimpleList(type[[1]], xmlGetAttr(type, "name"))
6: FUN(X[[2L]], ...)
5: lapply(xmlChildren(u), processSchemaType, types = types)
4: processSchemaType(el, substitutionGroups = substGroups)
3: FUN(1:156[[11L]], ...)
2: lapply(seq(length = xmlSize(node)), function(i) {
el = node[[i]]
if (inherits(el, c("XMLCommentNode", "XMLInternalCommentNode")) ||
xmlName(el) %in% c("import", "include"))
return(NULL)
if (xmlName(el) == "annotation")
return(NULL)
if (xmlName(el) == "schema") {
if (xmlSize(el) == 1 && names(el) == "schema")
el = el[[1]]
ns = xmlGetAttr(el, "targetNamespace")
if (verbose)
cat("processing (sub) schema", xmlGetAttr(el, "targetNamespace"),
"\n")
o = processSchemaTypes(el, doc, namespaceDefs, createConverters = FALSE,
verbose = verbose)
o = new("SchemaTypes", o)
o at elementFormQualified = xmlGetAttr(el, "elementFormQualified",
FALSE, as.logical)
if (length(o))
ans[[ns]] <<- o
}
else {
n = xmlGetAttr(el, "name", as.character(NA))
if (verbose)
cat(i, ")", n, " (", xmlName(el), ")\n")
o = processSchemaType(el, substitutionGroups = substGroups)
if (FALSE && createConverters && is(o, "BasicSOAPType"))
o at fromConverter = createSOAPConverter(o, ans)
ans[[n]] <<- o
}
NULL
})
1: XMLSchema:::processSchemaTypes(root, root, verbose = TRUE)
--
IPB Halle AG Massenspektrometrie & Bioinformatik
Dr. Steffen Neumann http://www.IPB-Halle.DE
Weinberg 3 http://msbi.bic-gh.de
06120 Halle Tel. +49 (0) 345 5582 - 1470
+49 (0) 345 5582 - 0
sneumann(at)IPB-Halle.DE Fax. +49 (0) 345 5582 - 1409
More information about the R-help
mailing list