[Mono-list] XML entities help
Joshua Tauberer
tauberer@for.net
Sat, 05 Mar 2005 12:27:21 -0500
Atsushi Eno wrote:
> If you set XmlValidatingReadr.ValidationType as ValidationType.None,
> it won't raise any validation error.
I did try that, but when I do that it doesn't resolve the entities.
--
- Joshua Tauberer
http://taubz.for.net
** Nothing Unreal Exists **
>
> Atsushi Eno
>
> Joshua Tauberer wrote:
>
>> 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!
>>