예제 #1
0
 // Processes a subset of RDF/XML metadata
 // Doesn't implement RDF/XML completely
 private void miniRdfXml(IElement node, RDFa.EvalContext context, RDFTerm subject)
 {
     string language=context.language;
     foreach(var child in node.getChildNodes()){
       IElement childElement=(child is IElement) ?
       ((IElement)child) : null;
       if(childElement==null) {
     continue;
       }
       if(node.getAttribute("xml:lang")!=null){
     language=node.getAttribute("xml:lang");
       } else {
     language=context.language;
       }
       if(childElement.getLocalName().Equals("Description") &&
       RDF_NAMESPACE.Equals(childElement.getNamespaceURI())){
     RDFTerm about=relativeResolve(childElement.getAttributeNS(RDF_NAMESPACE,"about"));
     //Console.WriteLine("about=%s [%s]",about,childElement.getAttribute("about"));
     if(about==null){
       about=subject;
       if(about==null) {
         continue;
       }
     }
     foreach(var child2 in child.getChildNodes()){
       IElement childElement2=
           ((child2 is IElement) ?
               ((IElement)child2) : null);
       if(childElement2==null) {
         continue;
       }
       miniRdfXmlChild(childElement2,about,language);
     }
       } else if(RDF_NAMESPACE.Equals(childElement.getNamespaceURI()))
     throw new NotSupportedException();
     }
 }
예제 #2
0
 private void miniRdfXml(IElement node, RDFa.EvalContext context)
 {
     miniRdfXml(node,context,null);
 }