[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-j-user
Subject:    Re: How to get current element node while parsing Schema itself
From:       Michael Glavassevich <mrglavas () ca ! ibm ! com>
Date:       2009-07-27 16:10:06
Message-ID: OFD466E464.1E43F4C8-ON85257600.005820B5-85257600.0058D0F1 () ca ! ibm ! com
[Download RAW message or body]

Hello Ajay,?

You're not missing anything. There's no support for
"http://apache.org/xml/properties/dom/current-element-node" in the
SchemaFactory and no alternate method for obtaining a DOM node from it. DOM
is an intermediate representation that we use while building the Schema but
that detail is kept completely internal today.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

ajay bhadauria <abhadauria@yahoo.com> wrote on 07/19/2009 06:00:40 PM:

> Hi,
>
> I am using newInstance method to get the SchemaFactory object as below
>
> schemafactory = SchemaFactory.newInstance
("http://www.w3.org/2001/XMLSchema");
>
> and then with this factory (schemafactory), I am getting Schema
> object with newSchema method of SchemaFactory class.
>
> I also registered schemafactory with ErrorHandler. So while  parsing
> schema, errorHandler does throw error but when I am trying to get
> current-element-node with below call
>   node = (Node) sf.getProperty( "http://apache.
> org/xml/properties/dom/current-element-node");
>
> it throws below exception
> org.xml.sax.SAXNotRecognizedException: Property 'http://apache.
> org/xml/properties/dom/current-element-node' is not recognized.
>
> Could you please help me what I am missing here ?
>
> Thanks
> Ajay
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
[Attachment #3 (text/html)]

<html><body>
<p><tt>Hello Ajay,</tt><br>
<br>
<tt>You're not missing anything. There's no support for </tt><tt>&quot;<a \
href="http://apache.org/xml/properties/dom/current-element-node">http://apache.org/xml/properties/dom/current-element-node</a>&quot; \
in the SchemaFactory and no alternate method for obtaining a DOM node from it. DOM is \
an intermediate representation that we use while building the Schema but that detail \
is kept completely internal today.</tt><br> <br>
<tt>Thanks.</tt><br>
<br>
<tt>Michael Glavassevich<br>
XML Parser Development<br>
IBM Toronto Lab<br>
E-mail: mrglavas@ca.ibm.com</tt><br>
<tt>E-mail: mrglavas@apache.org</tt><br>
<br>
<tt>ajay bhadauria &lt;abhadauria@yahoo.com&gt; wrote on 07/19/2009 06:00:40 PM:<br>
<br>
&gt; Hi,<br>
&gt; <br>
&gt; I am using newInstance method to get the SchemaFactory object as below<br>
&gt; <br>
&gt; schemafactory = SchemaFactory.newInstance(&quot;<a \
href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>&quot;);<br>
 &gt; <br>
&gt; and then with this factory (schemafactory), I am getting Schema <br>
&gt; object with newSchema method of SchemaFactory class. <br>
&gt; <br>
&gt; I also registered schemafactory with ErrorHandler. So while &nbsp;parsing<br>
&gt; schema, errorHandler does throw error but when I am trying to get <br>
&gt; current-element-node with below call<br>
&gt; &nbsp; node = (Node) sf.getProperty( &quot;<a \
href="http://apache">http://apache</a>.<br> &gt; \
org/xml/properties/dom/current-element-node&quot;);<br> &gt; &nbsp;<br>
&gt; it throws below exception<br>
&gt; org.xml.sax.SAXNotRecognizedException: Property 'http://apache.<br>
&gt; org/xml/properties/dom/current-element-node' is not recognized.<br>
&gt; <br>
&gt; Could you please help me what I am missing here ? <br>
&gt; <br>
&gt; Thanks<br>
&gt; Ajay<br>
&gt; <br>
&gt; ---------------------------------------------------------------------<br>
&gt; To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org<br>
&gt; For additional commands, e-mail: j-users-help@xerces.apache.org</tt><tt><br>
</tt></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic