Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XmlValidatingReader fails to accept XmlNodeReader and XslTransform.Transfrom

0 views
Skip to first unread message

Gleb Holodov

unread,
Jul 5, 2002, 3:54:29 PM7/5/02
to
Dear All!

has anyone encountered the same problem as I did:

XmlValidatingReader constructor throws a very "informative" exception with a
message "reader" when given XmlNodeReader or a XmlReader resulting from a
call to XslTransform.Transform.

Any help would be greatly appreciated!


--
Warmest regards, Gleb Holodov

Software Developer
ThinkWave Inc.
www.thinkwave.com
gl...@NO-SPAM.thinkwave.com

Gleb Holodov

unread,
Jul 5, 2002, 4:59:31 PM7/5/02
to
Well, after playing for some time with ILDASM, I figured out that a
contsructor looks something like

XmlValidatingReader::XmlValidatingReader( XmlReader reader )
{
if( !( reader is XmlTextReader ) )
throw new ArgumentException( "reader" );
...
}

Such a fraud... So, although it accepts XmlReader, XmlTextReader is
required. That means that no standard XmlReader other than XmlTextReader is
suitable - neither XmlNodeReader nor XslTransform.Transform... Well, this
limitation seems to be strange. I can hardly believe that a DOM and thus
XmlNodeReader lacks on certain information needed for schema validation...

Gleb

Dare Obasanjo

unread,
Jul 5, 2002, 5:34:23 PM7/5/02
to

This behavior is by design and is noted in the documentation for the
XmlValidatingReader(XmlReader) constructor at


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemxmlxmlvalidatingreaderclassctortopic1.asp

which states

reader
The XmlReader to read from while validating. The current implementation only
supports XmlTextReader.

Support for other XmlReader subclasses should be added in a future release.

--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Gleb Holodov" <g...@mail.ru> wrote in message
news:uab04YGJCHA.3804@tkmsftngp10...

Gleb Holodov

unread,
Jul 6, 2002, 12:22:43 PM7/6/02
to
Thanks, Dare!

I was really not attentive enough and didn't mention that comment in SDK.
I'm also glad that XmlNodeReader compatibility will be added in a future
release, since this should imporve performance...

Gleb

Kristoffer Sheather

unread,
Jul 25, 2002, 2:58:05 AM7/25/02
to
When is the next release expected btw?

>.
>

0 new messages