RE: XML parser

2003-05-22 Thread Rahul Srivastava
Shital Joshi wrote... I tried setting this property: parser.setFeature( http://apache.org/xml/features/dom/defer-node-expansion; ,false); But it gives me SAXNotSupportedException. I am using Xercers-j 2.4. Any ideas why? That's because you are trying to set a DOM Feature

RE: How to get the full parent child path on schema validation.

2003-05-14 Thread Rahul Srivastava
u plz help me as how to use it or give me a small sample of how to use it, coz so far i have only used setting features. I am very thankful for your time and help. Ragu CircuitVision -Original Message- From: Rahul Srivastava [mailto:[EMAIL PROTECTED] Sent: Tuesday

RE: How to get the full parent child path on schema validation.

2003-05-14 Thread Rahul Srivastava
Rahul Srivastava wrote: Ragunath Marudhachalam wrote... Hi Rahul, Thanks for the tip. I'm using DOM Parser. I went thru the link u gave me, but i didnt get to know how to use it. I mean to set the property, and how to get the element name. If you have read the docs

RE: How to get the full parent child path on schema validation.

2003-05-13 Thread Rahul Srivastava
Hi Ragu, You did not mention which parsing are you using viz. SAX/DOM parsing!. In case you are using DOM parsing, you can try using the property dom/current-element-node, which will give you the current node. You can then traverse back from that node and get the full tree. See:

RE: Problem with XML Validation

2003-05-07 Thread Rahul Srivastava
Hi Vamsi, Vamsi Atluri wrote... Hi, (I posed this on xerces-j-users list, but didn't get any reply yet). I am using Xerces 2.4.0 for parsing XML files and validating the XML against the schema file. I created an entity resolver class which loads the XSD file from the local disk

RE: Constraints in Schema

2003-05-05 Thread Rahul Srivastava
, then looks for nodes in the null namespace. But, when you have a targetNamespace in the Schema, you must use prefixes in the XPath expressions for correct result. Cheers, Rahul. Any ideas? Regards, Ramana.JV. -Original Message- From: Rahul Srivastava [mailto:[EMAIL PROTECTED

RE: End of line chars being treated as content by SAX

2003-05-05 Thread Rahul Srivastava
Hi Andy, Ignorable whitespaces can be identified only when there exists a grammar for the instance doc, and that grammar *must* be a DTD. XMLSchema do not identify ignorable whitespaces. So, iff you have a DTD associated with your instance, and you are using SAX parsing, then, these ignorable

RE: End of line chars being treated as content by SAX

2003-05-05 Thread Rahul Srivastava
to not include code fragments, but (infuriatingly!) I get into trouble for doing this. Does anyone know when the forum archives will be working again? I'm sure we'd all have to ask fewer questions! All the best, Andy From: Rahul Srivastava Reply-To: [EMAIL PROTECTED] To: [EMAIL

RE: Constraints in Schema

2003-05-02 Thread Rahul Srivastava
Hi Ramana, The XPath expression in your Schema, for the selector, is something like: xsd:selector xpath=Axis/ This expression tries to find an element - Axis, with null namespace, but, the Axis element you have defined in your Schema, lies in http://www.pearson.com/assessments/MTx namespace.

RE: Document is invalid: no grammar found

2003-04-24 Thread Rahul Srivastava
Hi Andy, As the exception says - no grammar is found for the instance. With so little information available, my guess is, the URI used, is being resolved to some other location,than where the Schema is present, while the Server is running.As the Server has its own document root, you might

RE: cannot convince xerces to call ignorableWhitespace()

2003-04-17 Thread Rahul Srivastava
Schweigl, Johann wrote... i'm trying to split a huge XML document via SAX and want to get rid of whitespace between elements. The underlying schema has no mixed=true attribute, so I suppose every whitespace character in between elements qualifies as ignorable. I'm overloading the

RE: Mailing list archive

2003-04-17 Thread Rahul Srivastava
Richard Rowell wrote... I subscribed to this list over six months ago. In that time the list has not had an archive AFAIK. Does anyone have a full archive dating back farther then that (maybe to the beginning)? If someone could provide a copy of the archive, I would be happy to

RE: Can I stop SAX validation from resolving non-approved namespaces?

2003-04-15 Thread Rahul Srivastava
Hi Andy, When you use, external-schemalocation property, any XMLSchema referred from within the XML instance is ignored and the schema specified using the external-schemalocation property is considered, provided, the schema referred and the schema supplied using property have the same

RE: Validating against an explicitly provided schema with SAX

2003-04-01 Thread Rahul Srivastava
Hi Andy, If you want to override the schema referred from the instance document, you can use the http://apache.org/xml/properties/schema/external-schemaLocation property. See: http://xml.apache.org/xerces2-j/properties.html#schema.external-schemaLocation for more details. Cheers, Rahul.

RE: xerces classes for caching/preparsing a DTD

2003-04-01 Thread Rahul Srivastava
Anthony Saucet wrote... I've seen in the samples, it's possible to cache/preparse a DTD. I don't understand the purpose of this. You can go through the grammar caching FAQs to have a better understanding of this. See: http://xml.apache.org/xerces2-j/faq-grammars.html Cheers, Rahul.

Re: Specify XML Schema Manually

2002-04-08 Thread Rahul Srivastava
Joan Pujol wrote... How can I verify a document against a schema manually Manually??? (ignoring the SchemaLocations attributes, and specify the schema file in the program code). use external-schemaLocation or external-noNamespaceSchemaLocation. See:

Re: question: XML Schema location

2002-03-19 Thread Rahul Srivastava
Demis Corvaglia wrote... Preliminary remarks: I'm a beginner! I have tried to use XML Schema with Xerces 2.0.1 but I can't locate the xsd file on my file system. snip/ What can I do? These are very stupid question I know, but there aren't tutorial or manual where to

Re: Problem in validating the ebXML message with XSD

2002-03-11 Thread Rahul Srivastava
From: Vijaya Kumar [EMAIL PROTECTED] To: [EMAIL PROTECTED], xerces-j-dev@xml.apache.org Cc: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Hi

Re: Exception

2002-03-08 Thread Rahul Srivastava
Ryan D. Cuprak wrote... Does anyone know what this error message means or what I maybe doing wrong? This got fixed in 2.0.1. Cheers, Rahul. Thanks, Ryan java.lang.ArrayIndexOutOfBoundsException at org.apache.xerces.util.NamespaceSupport.popContext(NamespaceSupport.java:218)

Re: Using an external-SchemaLocation for xml schema validation

2002-03-04 Thread Rahul Srivastava
[EMAIL PROTECTED] wrote... Hello, No I am using xercesImp.jar and xercesParserAPIs.jar and have written a parser to validate an xml document against an external schema. I have the following line in my code:

Re: Location of xsd

2001-11-20 Thread Rahul Srivastava
From: abhishekhp [EMAIL PROTECTED] Hi, Is it possible to specify a relative or an absolute location of an xsd, or is it mandatory for the xsd file to be located on a web-server. The application that i am running is unable to find the xsd file when a path (like c:\Xsd\ABC.xsd) is specified,

Re: need help

2001-11-20 Thread Rahul Srivastava
From: Sridhar Raju Y [EMAIL PROTECTED] Hi ! Can anybody explain the difference between tags import and include in XMLSchema. #The import element allows you to reference elements in another namespace. #The include element allows you to bring in schema definitions from other schemas. All

Re: specifying schemaLocation attribute in the XML header

2001-11-05 Thread Rahul Srivastava
From: abhishekhp [EMAIL PROTECTED] Hi, I am using xerces 1.4.3 to validate xml documents. The following xml file is to be validated against a schema (say ABC.xsd), ignoring MSGschema.xsd that is specified in its root attribute (This is achieved by using the EntityResolver property of the

RE: specifying schemaLocation attribute in the XML header

2001-11-05 Thread Rahul Srivastava
. But, xerces does provide this feature, so you can go ahead and use it. Cheers, Rahul. -Original Message- From: Rahul Srivastava [mailto:[EMAIL PROTECTED] Sent: Monday, November 05, 2001 9:45 PM To: [EMAIL PROTECTED] Subject: Re: specifying schemaLocation attribute in the XML header

RE: xsd schema problem

2001-11-02 Thread Rahul Srivastava
be qualified. If you set elementFormDefault as unqualified, it means that in the instance doc., you need to qualify *only* the global elements. Hope this helps. Cheers, Rahul. Thanks for your help Colin -Original Message- From: Rahul Srivastava [mailto:[EMAIL PROTECTED] Sent: 02

RE: xsd schema problem

2001-11-02 Thread Rahul Srivastava
Which one is your first schema?. Cheers, Rahul. Colin. -Original Message- From: Rahul Srivastava [mailto:[EMAIL PROTECTED] Sent: 02 November 2001 06:44 To: [EMAIL PROTECTED] Subject: RE: xsd schema problem From: Colin Savage [EMAIL PROTECTED] someone just told me how

Re: adding value to Node

2001-10-22 Thread Rahul Srivastava
From: Sudeendra Kumar [EMAIL PROTECTED] hi all, we are unable to get XML parsers(we r using apache parser) i mean parser is not validating against xmlschema even after setting all properties ,could anybody help to sort out this problem Have you set the error handler to report errors!!.

Re: Fw: adding value to Node

2001-10-22 Thread Rahul Srivastava
This is a sample code that comes with xerces and should work perfectly with xerces 1.x. If you are trying to use xerces2, then, xerces2 does not has schema support yet!. Cheers, Rahul. Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm list-help: mailto:[EMAIL PROTECTED]

Re: changing attribute of Node

2001-10-14 Thread Rahul Srivastava
is org.apache.xerces.dom.DeferredAttrNSImpl java.lang.ClassCastException: org.apache.xerces.dom.DeferredAttrNSImpl Rahul Srivastava wrote: The attributes of an element node are again org.w3c.Node(s). So, you can use the same set of APIs to modify the attribute as for elements

Re: Help required in validation against XSD

2001-10-14 Thread Rahul Srivastava
From: Rajesh_KumarT [EMAIL PROTECTED] To: [EMAIL PROTECTED] Hi, We are trying to validate an XML against an XSD. We are using Xerces 1.4.2 parser for the same. We are using the attribute xsi:noNamespaceSchemaLocation='WD-BPML-20010502.xsd' in the XML for the same. It is working

RE: Help required in validation against XSD

2001-10-14 Thread Rahul Srivastava
. Thanks. regards, Rajesh -Original Message- From: Rahul Srivastava [mailto:[EMAIL PROTECTED] Sent: Monday, October 15, 2001 12:55 AM To: [EMAIL PROTECTED] Subject: Re: Help required in validation against XSD From: Rajesh_KumarT [EMAIL PROTECTED] To: [EMAIL PROTECTED

RE: Help required in validation against XSD

2001-10-14 Thread Rahul Srivastava
-Original Message- From: Rahul Srivastava [mailto:[EMAIL PROTECTED] Sent: Monday, October 15, 2001 1:50 AM To: [EMAIL PROTECTED] Subject: RE: Help required in validation against XSD From: Rajesh_KumarT [EMAIL PROTECTED] To: [EMAIL PROTECTED] Hi, Thanks for an immediate

RE: Creating a string from a portion of XML DOM tree

2001-09-13 Thread Rahul Srivastava
Try using importNode and this should solve your problem. Cheers, Rahul. From: Menarek John-NJM010 [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: RE: Creating a string from a portion of XML DOM tree Date: Wed, 12 Sep 2001 16:28:55 -0500 I think you are right but I am

Re: Traversing an XMLDocument

2001-09-12 Thread Rahul Srivastava
If you want pqr and lmn to be treated as two different names and abc+xyz as a single name, then, where is the problem!!. You can parse your xml file using SAX/DOM. Anything that you encounter b/w elements name and /name events in SAX can be marked as a single name. Alternatively, if you are

Re: Question about schema validation

2001-07-09 Thread Rahul Srivastava
__ /_/\ Rahul Srivastava / \\ \Member Technical Staff, Javasoft /_\ \\ / Sun Microsystems India Pvt. Ltd. /_/ \/ / / 5th Floor, Divyasree Chambers, /_/ / \//\ Off Langford Road, Shanthinagar, \_\//\ / / Banglore

Re: AW: Namespace Prefix necessary with 1.4 ?

2001-06-28 Thread Rahul Srivastava
] Rahul Srivastava Rahul.Srivastav To: [EMAIL PROTECTED

Re: Namespace Prefix necessary with 1.4 ?

2001-06-27 Thread Rahul Srivastava
You are right Juliane. It works with xerces1.4.0. In Xerces1.4.1 you have to use the prefixes. Rahul. Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm list-help: mailto:[EMAIL PROTECTED] list-unsubscribe: mailto:[EMAIL PROTECTED] list-post: mailto:[EMAIL PROTECTED] Delivered-To:

Re: AW: Namespace Prefix necessary with 1.4 ?

2001-06-27 Thread Rahul Srivastava
Hi Sandy, The schema you have mentioned here is not referencing any new types. If you have an element which is referencing a user defined data type in the schema, then you have the problem. Xerces1.4.1 gives the following error: Error: Schema error: type not found :

Re: Problem in schema validation

2001-06-25 Thread Rahul Srivastava
Check the namespace you are using for schema. If you are using xerces-j-1.4.0 then you should use http://www.w3.org/2001/XMLSchema; instead of http://www.w3.org/2000/10/XMLSchema;. This type of problem viz. Element not declared usually occurs because of using incorrect namespace. Rahul.

Re: problems getting started

2001-06-11 Thread Rahul Srivastava
Try appending your working directory, where your program is residing, in the classpath. Also, you don't need to logoff when you change the env. var. viz. classpath, path, etc. Simply close the console (Okay, I mean DOS-prompt window) and open again. Rahul. From: Dane Foster [EMAIL PROTECTED]