[Mono-list] XML entities help

Joshua Tauberer tauberer@for.net
Sat, 05 Mar 2005 11:52:20 -0500


Hi.  I've got an XML document with entities declared in the DOCTYPE, and 
I want to have those entities replaced with their values in attributes. 
  XmlTextReader doesn't do this, so I need to use XmlValidatingReader, 
right?

But, the DOCTYPE node doesn't have full DTD information, and when the 
validating reader hits the document node it throws an exception that the 
element isn't declared.

I'm trying to load the W3's RDF OWL schema, which starts with:

<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [
      <!ENTITY rdf  "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
      <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
      <!ENTITY xsd  "http://www.w3.org/2001/XMLSchema#" >
      <!ENTITY owl  "http://www.w3.org/2002/07/owl#" >
    ]>

<rdf:RDF
   xmlns     ="&owl;"
   xmlns:owl ="&owl;"
   xml:base  ="http://www.w3.org/2002/07/owl"
   xmlns:rdf ="&rdf;"
   xmlns:rdfs="&rdfs;"
 >

<Ontology rdf:about="">
   <imports rdf:resource="http://www.w3.org/2000/01/rdf-schema"/>

Am I missing some property that can be set to do entity resolving 
without actual validation, or is it impossible to load this document in 
(this version of) .NET?

Thanks to anyone who can shed light on this!

-- 
- Joshua Tauberer

http://taubz.for.net

** Nothing Unreal Exists **