> But when I have the schema starts with "sch:schema" it gives
> the following error,
> "Outermost element of schema document must be xs:schema"
> So, how can I read the schema other than normal xml schema
> for example schematron schema..?
Can you tell me what the actual name and namespace URI of the topmmost
element in your document are?
The error message is actually combining two tests into one: the name of the
element must have local name "schema" in namespace
"http://www.w3.org/2001/XMLSchema", and it must internally be implemented as
an instance of the XSDSchema class.
If you supply a NodeInfo from a tree that you have built yourself, Saxon
should rebuild the document so that it uses the right NodeFactory to take
care of the second condition, but I wouldn't swear that this path has been
tested: so it could be that the error is happening because Saxon isn't
accepting a pre-built document tree on this interface.