if (restrictions!=null) return;
schema xs = (schema) this.get_owner();
NamedNodeMap atts = node.getAttributes();
for (int i=0; i<atts.getLength(); i++) {
Attr attr = (Attr) atts.item(i);
if (attr.getNodeName().startsWith("xmlns")) continue;
String ns = attr.getNamespaceURI();
StringTokenizer t = new StringTokenizer(namespace);
while (t.hasMoreTokens()) {
String n = t.nextToken();
String tns = xs.getTargetNamespace();
if (n.equals("##any") // anything at all
|| (n.equals("##other") && (tns==null || !tns.equals(ns))) // other than the TNS
|| (n.equals("##targetNamespace") && (tns==null || tns.equals(ns))) // in the target namespace
|| (n.equals("##local") && ns==null) // local to this schema
|| n.equals(ns) ) { // else the ns is anyURI
// is this a known attribute?
String uri = attribute.createURI(attr,null,ctx);
attribute a = ctx.getAttribute(uri);
if (a!=null) {
a.toRDF(subject, attr, ctx);
if (attr.getPrefix()!=null)
addPrefixes(attr.getPrefix(), attr.getNamespaceURI(), ctx.getModel());
}
else { // otherwise use the default no-schema mapping
if (getProcessContents().equals("strict")
&& !n.equals("##any") && !n.equals("##other") && !n.equals("##local"))
Gloze.logger.warn("cannot find attribute: "+attr.getName());
noSchemaToRDF(subject,attr,ctx);
}
}
}
}