From xerces-j-hvillarreal@example.net Sat Sep 01 16:14:21 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 60033 invoked by uid 500); 1 Sep 2001 16:14:21 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 60024 invoked from network); 1 Sep 2001 16:14:19 -0000 Message-ID: <021e01c13301$44239110$a400a8c0@vitaly> From: "Vitaly Davidenko" <hvillarreal@example.net> To: <hvillarreal@example.net> Subject: XPathAPI and http://xml.org/sax/features/namespaces feature Date: Sat, 1 Sep 2001 20:15:06 +0400 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_021A_01C13322.CAC11280" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------=_NextPart_000_021A_01C13322.CAC11280 Content-Type: multipart/alternative; boundary="----=_NextPart_001_021B_01C13322.CAC11280" ------=_NextPart_001_021B_01C13322.CAC11280 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Hello! I have a document with "xmlns" attribute, for example, <?xml version=3D"1.0"?> <a xmlns=3D"http://www.company.com/"> <b> </b> </a> =20 =20 When "http://xml.org/sax/features/namespaces" feature is turned off , = expression XPathAPI.selectSingleNode(document,"/a/b") returns the = reference to element <b>, otherwise it returns null. How to select element <b> if "http://xml.org/sax/features/namespaces" = feature is turned on? Thanks, Vitaly =20 (I am using Xerces from Xalan-Java version 2.2.D9 distributive) ------=_NextPart_001_021B_01C13322.CAC11280 Content-Type: text/html; charset="koi8-r" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Dkoi8-r" http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Hello!</FONT></DIV> <DIV><FONT face=3D"Arial CYR" size=3D2>I have a document with "xmlns"=20 attribute,&nbsp; for example,</FONT></DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3D"Courier New">&lt;?xml version=3D"1.0"?&gt;<BR>&lt;a=20 xmlns=3D"http://www.company.com/"&gt;<BR>&nbsp;&lt;b&gt;<BR>&nbsp;&lt;/b&= gt;<BR>&lt;/a&gt;</FONT></DIV> <DIV><FONT face=3DArial size=3D2> <DIV><FONT face=3D"Arial CYR"></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial>When&nbsp;<FONT face=3D"Courier New">=20 "http://xml.org/sax/features/namespaces"&nbsp;<FONT face=3D"Arial = CYR">feature=20 </FONT></FONT></FONT><FONT face=3D"Arial CYR">is&nbsp;</FONT>turned=20 off&nbsp;,&nbsp; expression <FONT=20 face=3D"Courier New CE">XPathAPI.selectSingleNode(document,"/a/b") = </FONT>returns=20 the reference to element &lt;b&gt;, otherwise it returns null.</DIV> <DIV>&nbsp;</DIV> <DIV>How to select element &lt;b&gt; <FONT face=3D"Courier New CYR">if = "<A=20 href=3D"http://xml.org/sax/features/namespaces">http://xml.org/sax/featur= es/namespaces</A>"&nbsp;</FONT>feature=20 is turned on?</DIV> <DIV>&nbsp;</DIV> <DIV>&nbsp;</DIV> <DIV><FONT face=3DArial>Thanks,</FONT></DIV> <DIV><FONT face=3DArial>Vitaly</FONT></DIV> <DIV><FONT face=3DArial></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial>(I am using Xerces from Xalan-Java version = 2.2.D9=20 distributive)</FONT></DIV> <DIV>&nbsp;</DIV></FONT></DIV></BODY></HTML> ------=_NextPart_001_021B_01C13322.CAC11280-- ------=_NextPart_000_021A_01C13322.CAC11280 Content-Type: text/xml; name="1.xml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="1.xml" <?xml version="1.0"?> <a> <b> </b> </a> ------=_NextPart_000_021A_01C13322.CAC11280 Content-Type: text/xml; name="2.xml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="2.xml" <?xml version="1.0"?> <a xmlns="http://www.company.com/"> <b> </b> </a> ------=_NextPart_000_021A_01C13322.CAC11280 Content-Type: application/x-javascript; name="Test.java" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Test.java" import java.io.*;=0A= import org.w3c.dom.*;=0A= import org.apache.xpath.XPathAPI;=0A= import org.apache.xerces.parsers.DOMParser;=0A= import org.xml.sax.SAXException;=0A= =0A= public class Test{=0A= =0A= public static void main(String[] args) throws Exception=0A= {=0A= Document _1_1_xml =3D parse1("1.xml");=0A= Document _1_2_xml =3D parse1("2.xml");=0A= =0A= Document _2_1_xml =3D parse2("1.xml");=0A= Document _2_2_xml =3D parse2("2.xml");=0A= =0A= //work fine=0A= System.out.println(XPathAPI.selectSingleNode(_1_1_xml, "/a/b"));=0A= System.out.println(XPathAPI.selectSingleNode(_1_2_xml, "/a/b"));=0A= System.out.println(XPathAPI.selectSingleNode(_2_1_xml, "/a/b"));=0A= =0A= //How to select the <b> from 2.xml?=0A= System.out.println(XPathAPI.selectSingleNode(_2_2_xml, "/a/b"));=0A= }=0A= =0A= private static Document parse1(String location) throws Exception=0A= {=0A= DOMParser parser =3D new DOMParser();=0A= =0A= try {=0A= parser.setFeature("http://xml.org/sax/features/namespaces", = false);=0A= }=0A= catch (SAXException e) {=0A= System.err.println("could not set parser feature");=0A= throw e;=0A= }=0A= =0A= parser.parse(new File(location).toURL().toString());=0A= return parser.getDocument();=0A= }=0A= =0A= private static Document parse2(String location) throws Exception=0A= {=0A= DOMParser parser =3D new DOMParser();=0A= parser.parse(new File(location).toURL().toString());=0A= return parser.getDocument();=0A= }=0A= } ------=_NextPart_000_021A_01C13322.CAC11280 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net ------=_NextPart_000_021A_01C13322.CAC11280-- From xerces-j-hvillarreal@example.net Sat Sep 01 17:53:53 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 99354 invoked by uid 500); 1 Sep 2001 17:53:52 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 99345 invoked from network); 1 Sep 2001 17:53:52 -0000 Message-ID: <004301c1330f$05388240$a5151597@it> From: "Amedeo Farello" <hvillarreal@example.net> To: "xerces-j-user" <hvillarreal@example.net> References: <hvillarreal@example.net> Subject: Re: DTD validation Date: Sat, 1 Sep 2001 19:51:22 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > are you sure you implemented the ErrorHandler to capture the error and > warning messages? Yes. By the way, I also use an IBM Alphaworks utility named XML Viewer, based upon the XML4J parser and it shows the same behaviour. Amedeo > > > Please respond to xerces-j-user <hvillarreal@example.net> > To: xerces-j-user <hvillarreal@example.net> > cc: > > Subject: Re: DTD validation > > Hi Anish, > > > Your XML file and the Dtd is correct . Your dtd correctly says that > there > > will be a name tag inside the content tag. So the parser is correctly > not > > complaining. > > Inside the content tag, _not_ inside the container tag at the same level > with > the content tag. > I would like to have the parser complain because it has found a name tag > _outside_ the content tag. How should I write the DTD to obtain this > behaviour? > > Am I missing something fundamental? > > Thanks > > Amedeo > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: hvillarreal@example.net > For additional commands, e-mail: hvillarreal@example.net > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Sun Sep 02 19:27:58 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 22470 invoked by uid 500); 2 Sep 2001 19:27:58 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 22461 invoked from network); 2 Sep 2001 19:27:57 -0000 Date: Sun, 02 Sep 2001 21:29:41 +0200 From: Christian Geuer-Pollmann <hvillarreal@example.net> Subject: Re: XPathAPI and http://xml.org/sax/features/namespaces feature In-reply-to: <021e01c13301$44239110$a400a8c0@vitaly> To: hvillarreal@example.net Message-id: <985.366.1074.999466181@pinkpanther> MIME-version: 1.0 X-Mailer: Mulberry/2.0.8 (Win32) Content-type: text/plain; format=flowed; charset=us-ascii Content-disposition: inline Content-transfer-encoding: 7BIT X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > I have a document with "xmlns" attribute, for example, > > <?xml version="1.0"?> > <a xmlns="http://www.company.com/"> > <b> > </b> > </a> > > When "http://xml.org/sax/features/namespaces" feature is turned off , > expression XPathAPI.selectSingleNode(document,"/a/b") returns the > reference to element <b>, otherwise it returns null. > How to select element <b> if "http://xml.org/sax/features/namespaces" > feature is turned on? Element nsresolver = doc.createElement("resolver"); nsresolver.setAttribute("nspref", "http://www.company.com/"); XPathAPI.selectSingleNode(document,"/nspref:a/nspref:b", nsresolver); --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Mon Sep 03 03:33:51 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 74106 invoked by uid 500); 3 Sep 2001 03:33:51 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 74097 invoked from network); 3 Sep 2001 03:33:50 -0000 To: hvillarreal@example.net Subject: Japanese Tag cause Exception X-Mailer: Mew version 1.93 on Emacs 20.3 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <hvillarreal@example.net> Date: Mon, 03 Sep 2001 12:33:54 +0900 From: IKEDA Katsumi <hvillarreal@example.net> X-Dispatcher: imput version 990905(IM130) Lines: 55 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, I use Xerces 1.4.3, Apache SOAP 2.2 and JDK 1.3.1 on Windows2000. My client program communicates with server program using SOAP. I want to use Japanese tags. It works well 'Client --> Server'. However it doesn't work 'Server --> Client'. (response) If I don't use Japanese tag, my program works well. However I use Japanese tag, my program is occurred following exception. [SOAPException: faultCode=SOAP-ENV:Client; msg=Parsing error, response was: Element type "?" must be followed by either attribute specifications, ">" or "/>".; targetException=org.xml.sax.SAXParseException: Element type "?" must be followed by either attribute specifications, ">" or "/>".] at org.apache.soap.messaging.Message.receiveEnvelope(Message.java:160) at edi.transport.TransportManager.sendSogofurikomiirai (TransportManager.java:64) A part of program codes are following: [A part of Server code] private static void setResponseElement(Element ret, SOAPContext retCtx) throws IOException, MessagingException { Envelope retEnv = new Envelope(); Body retBody = new Body(); Vector retList = new Vector(); retList.add(ret); retBody.setBodyEntries(retList); retEnv.setBody(retBody); StringWriter writer = new StringWriter(); retEnv.marshall(writer, null, retCtx); retCtx.setRootPart(writer.toString(), "text/xml"); } [A part of TransportManager.java] 60 try { 61 URL url 62 = new URL("http://localhost:8081/soap/servlet/messagerouter"); 63 msg.send(url, "urn:bankmediator", env); 64 resElement = (Element)msg.receiveEnvelope().getBody() 65 .getBodyEntries().elementAt(0); 66 } catch (Exception e) { 67 e.printStackTrace(); 68 } What should I do? Thanks. --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Tue Sep 04 09:07:42 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 24915 invoked by uid 500); 4 Sep 2001 09:07:42 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 24825 invoked from network); 4 Sep 2001 09:07:40 -0000 To: hvillarreal@example.net Subject: Re: Japanese Tag cause Exception In-Reply-To: Your message of "Mon, 03 Sep 2001 12:33:54 +0900" <hvillarreal@example.net> References: <hvillarreal@example.net> X-Mailer: Mew version 1.93 on Emacs 20.3 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <hvillarreal@example.net> Date: Tue, 04 Sep 2001 18:07:39 +0900 From: IKEDA Katsumi <hvillarreal@example.net> X-Dispatcher: imput version 990905(IM130) Lines: 31 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, My problem was solved. From: IKEDA Katsumi <hvillarreal@example.net> Message-ID: <hvillarreal@example.net> > > [A part of Server code] > private static void setResponseElement(Element ret, SOAPContext retCtx) > throws IOException, MessagingException { > > Envelope retEnv = new Envelope(); > Body retBody = new Body(); > Vector retList = new Vector(); > retList.add(ret); > retBody.setBodyEntries(retList); > retEnv.setBody(retBody); > StringWriter writer = new StringWriter(); > retEnv.marshall(writer, null, retCtx); > retCtx.setRootPart(writer.toString(), "text/xml"); > } Modify the last line, then program works well. [The modified line] retCtx.setRootPart(writer.toString(), "text/xml; charset=\"UTF-8\""); Thanks. -- IKEDA Katsumi <hvillarreal@example.net> --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Tue Sep 04 09:41:56 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 54368 invoked by uid 500); 4 Sep 2001 09:41:55 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 54335 invoked from network); 4 Sep 2001 09:41:54 -0000 Message-ID: <hvillarreal@example.net> From: "Giuseppe Sarno" <hvillarreal@example.net> To: hvillarreal@example.net Subject: SAX parser under traffic. Date: Tue, 4 Sep 2001 10:40:45 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C13525.ABE7C5C0" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C13525.ABE7C5C0 Content-Type: text/plain; charset="iso-8859-1" Hi Guys I'm using a SAX2 parser on server side. I made some traffic test and using the same XML doc I got this result: <<...OLE_Obj...>> why is that ? why some time is slow and sometime is not ? Can someone help me ? cheers. ------_=_NextPart_001_01C13525.ABE7C5C0 Content-Type: text/html; charset="iso-8859-1" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.89"> <TITLE>SAX parser under traffic.</TITLE> </HEAD> <BODY> <P><FONT SIZE=2 FACE="Arial">Hi Guys I'm using a SAX2 parser on server side.</FONT> </P> <P><FONT SIZE=2 FACE="Arial">I made some traffic test and using&nbsp; the same XML doc I got this result:</FONT> </P> <BR> <BR> <P><FONT FACE="Arial" SIZE=2 COLOR="#000000"> &lt;&lt;...OLE_Obj...&gt;&gt; </FONT> </P> <P><FONT SIZE=2 FACE="Arial">why is that ?</FONT> <BR><FONT SIZE=2 FACE="Arial">why some time is slow and sometime is not ?</FONT> </P> <BR> <P><FONT SIZE=2 FACE="Arial">Can someone help me ?</FONT> </P> <P><FONT SIZE=2 FACE="Arial">cheers.</FONT> </P> </BODY> </HTML> ------_=_NextPart_001_01C13525.ABE7C5C0-- From xerces-j-hvillarreal@example.net Tue Sep 04 13:01:17 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 51930 invoked by uid 500); 4 Sep 2001 13:01:16 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 51914 invoked from network); 4 Sep 2001 13:01:16 -0000 From: hvillarreal@example.net Subject: Re: Attribute References and Groups To: hvillarreal@example.net X-Mailer: Lotus Notes Release 5.0.4a July 24, 2000 Message-ID: <hvillarreal@example.net> Date: Tue, 4 Sep 2001 09:01:16 -0400 X-MIMETrack: Serialize by Router on D25ML04/25/M/IBM(Release 5.0.5 |September 22, 2000) at 09/04/2001 09:01:20 AM MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Tony, > Does that mean if an attribute is defined within an element, it belon= gs to > no namespace, but if it is defined globally, it belongs to the target= > namespace? > Could someone please confirm? 3.2.2 of the structure spec can answer you question. For global attribute: {target namespace} The =B7actual value=B7 of the targetNamespace [attri= bute] of the parent <schema> element information item, or =B7absent=B7 if there = is none. For local attribute: {target namespace} If form is present and its =B7actual value=B7 is qua= lified, or if form is absent and the =B7actual value=B7 of attributeFormDefault= on the <schema> ancestor is qualified, then the =B7actual value=B7 of the targetNamespace [attribute] of the parent <schema> element information item, or =B7absent=B7 if there is none, otherwise =B7absent=B7. Cheers, Sandy= --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Tue Sep 04 14:35:23 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 57258 invoked by uid 500); 4 Sep 2001 14:35:21 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 57249 invoked from network); 4 Sep 2001 14:35:20 -0000 Message-Id: <hvillarreal@example.net> X-Sender: hvillarreal@example.net X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Tue, 04 Sep 2001 10:35:47 -0400 To: hvillarreal@example.net From: Phil Mitchell <hvillarreal@example.net> Subject: RE: Basic schema validation problem In-Reply-To: <hvillarreal@example.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N yes, it is. But it seems that xerces is not interpreting the "xmlns" prefix...?? At 04:59 PM 8/30/01 -0400, you wrote: >make sure your name space in .xml and .xsd is like : > >"<http://www.w3.org/2001/>http://www.w3.org/2001/..." > >good luck. > >-----Original Message----- >From: Phil Mitchell >[<mailto:hvillarreal@example.net>mailto:hvillarreal@example.net] >Sent: Thursday, August 30, 2001 4:28 PM >To: hvillarreal@example.net >Subject: Basic schema validation problem > >Using xerces 1.4.2 I have been able to validate against a DTD, but not a >schema. I get the following error: > >Message: Attribute "xmlns:xsi" must be declared for element type "personnel". > >I am using the sample data (personal-schema.xml) provided with xerces. > >Is this version not schema-aware? Do I somehow need to define the xmlns >namespace? > >I tried to get 1.4.3, but the tarfile from apache appears to be corrupted. > >Apologies if this query is already answered -- the archives are down. > >--------------------------------------------------------------------- >To unsubscribe, e-mail: hvillarreal@example.net >For additional commands, e-mail: hvillarreal@example.net --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Tue Sep 04 19:30:21 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 6963 invoked by uid 500); 4 Sep 2001 19:30:20 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 6942 invoked from network); 4 Sep 2001 19:30:20 -0000 From: hvillarreal@example.net Importance: Normal To: hvillarreal@example.net Subject: Re: DTD validation X-Mailer: Lotus Notes Release 5.0.3 (Intl) 21 March 2000 Message-ID: <hvillarreal@example.net> Date: Tue, 4 Sep 2001 15:30:25 -0400 X-MIMETrack: Serialize by Router on D25ML03/25/M/IBM(Release 5.0.5 |September 22, 2000) at 09/04/2001 03:30:26 PM, Serialize complete at 09/04/2001 03:30:26 PM MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_alternative 006B48BE85256ABD_=" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --=_alternative 006B48BE85256ABD_= Content-Type: text/plain; charset="us-ascii" Hi Amedeo, I tried your test.xml and test.dtd using the sax.SAXCount sample using both Xerces-J 1.4.2 and 1.4.3, and both detected the error, so I'm not sure why you don't see an error reported. $ java sax.SAXCount -v test.xml [Error] test.xml:9:14: The content of element type "container" must match "(content)". test.xml: 1793 ms (4 elems, 0 attrs, 25 spaces, 6 chars) I assume that you've enabled the validation feature, because you indicated in your first note on this thread that you were getting callbacks for other validation errors. Is that correct? ((XMLReader)parser).setFeature("http://xml.org/sax/features/validation", true); Thanks, Henry ------------------------------------------------------------------------ Henry Zongaro XML Parsers development IBM SWS Toronto Lab Tie Line 778-6044; Phone 985.366.1074 mailto:hvillarreal@example.net Please respond to hvillarreal@example.net To: "xerces-j-user" <hvillarreal@example.net> cc: Subject: Re: DTD validation > are you sure you implemented the ErrorHandler to capture the error and > warning messages? Yes. By the way, I also use an IBM Alphaworks utility named XML Viewer, based upon the XML4J parser and it shows the same behaviour. Amedeo > > > Please respond to xerces-j-user <hvillarreal@example.net> > To: xerces-j-user <hvillarreal@example.net> > cc: > > Subject: Re: DTD validation > > Hi Anish, > > > Your XML file and the Dtd is correct . Your dtd correctly says that > there > > will be a name tag inside the content tag. So the parser is correctly > not > > complaining. > > Inside the content tag, _not_ inside the container tag at the same level > with > the content tag. > I would like to have the parser complain because it has found a name tag > _outside_ the content tag. How should I write the DTD to obtain this > behaviour? > > Am I missing something fundamental? > > Thanks > > Amedeo --=_alternative 006B48BE85256ABD_= Content-Type: text/html; charset="us-ascii" <br><font size=2><tt><br> Hi Amedeo,<br> </tt></font> <br><font size=2><tt>&nbsp; &nbsp; &nbsp;I tried your test.xml and test.dtd using the sax.SAXCount sample using both Xerces-J 1.4.2 and 1.4.3, and both detected the error, so I'm not sure why you don't see an error reported.</tt></font> <br> <br><font size=2><tt>$ java sax.SAXCount -v test.xml</tt></font> <br><font size=2><tt>[Error] test.xml:9:14: The content of element type &quot;container&quot; must match &quot;(content)&quot;.</tt></font> <br><font size=2><tt>test.xml: 1793 ms (4 elems, 0 attrs, 25 spaces, 6 chars)</tt></font> <br> <br> <br><font size=2><tt>&nbsp; &nbsp; &nbsp;I assume that you've enabled the validation feature, because you indicated in your first note on this thread that you were getting callbacks for other validation errors. &nbsp;Is that correct?</tt></font> <br> <br><font size=2><tt>((XMLReader)parser).setFeature(&quot;http://xml.org/sax/features/validation&quot;,</tt></font> <br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;true);</tt></font> <br> <br><font size=2><tt><br> Thanks,<br> <br> Henry<br> ------------------------------------------------------------------------<br> Henry Zongaro &nbsp; &nbsp; &nbsp;XML Parsers development<br> IBM SWS Toronto Lab &nbsp; Tie Line 778-6044; &nbsp;Phone 985.366.1074<br> mailto:hvillarreal@example.net<br> </tt></font> <p><font size=1 color=#800080 face="sans-serif">Please respond to hvillarreal@example.net </font> <p><font size=1 color=#800080 face="sans-serif">To: &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=1 face="sans-serif">&quot;xerces-j-user&quot; &lt;hvillarreal@example.net&gt;</font> <br><font size=1 color=#800080 face="sans-serif">cc: &nbsp; &nbsp; &nbsp; &nbsp; </font> <br><font size=1 color=#800080 face="sans-serif">Subject: &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=1 face="sans-serif">Re: DTD validation</font> <br> <br> <br><font size=2 face="Courier New">&gt; are you sure you implemented the ErrorHandler to capture the error and<br> &gt; warning messages?<br> <br> Yes.<br> <br> By the way, I also use an IBM Alphaworks utility named XML Viewer, based upon<br> the XML4J parser and it shows the same behaviour.<br> <br> Amedeo<br> <br> &gt;<br> &gt;<br> &gt; Please respond to xerces-j-user &lt;hvillarreal@example.net&gt;<br> &gt; To: &nbsp; &nbsp; xerces-j-user &lt;hvillarreal@example.net&gt;<br> &gt; cc:<br> &gt;<br> &gt; Subject: &nbsp; &nbsp; &nbsp; &nbsp;Re: DTD validation<br> &gt;<br> &gt; Hi Anish,<br> &gt;<br> &gt; &gt; Your XML file and the Dtd is correct . Your dtd correctly says that<br> &gt; there<br> &gt; &gt; will be a name tag inside the content tag. So the parser is correctly<br> &gt; not<br> &gt; &gt; complaining.<br> &gt;<br> &gt; Inside the content tag, _not_ inside the container tag at the same level<br> &gt; with<br> &gt; the content tag.<br> &gt; I would like to have the parser complain because it has found a name tag<br> &gt; _outside_ the content tag. How should I write the DTD to obtain this<br> &gt; behaviour?<br> &gt;<br> &gt; Am I missing something fundamental?<br> &gt;<br> &gt; Thanks<br> &gt;<br> &gt; Amedeo<br> </font> --=_alternative 006B48BE85256ABD_=-- From xerces-j-hvillarreal@example.net Tue Sep 04 21:13:30 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 59884 invoked by uid 500); 4 Sep 2001 21:13:29 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 59852 invoked from network); 4 Sep 2001 21:13:29 -0000 Message-ID: <hvillarreal@example.net> Date: Tue, 04 Sep 2001 16:19:26 -0500 From: Wendi Sisson <hvillarreal@example.net> Organization: FedEx Services X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: hvillarreal@example.net Subject: Re: do not load external dtd References: <hvillarreal@example.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N What is the purpose of an external subset such as SYSTEM "blah.dtd" below? Thanks, Wendi hvillarreal@example.net wrote: > > Hi Wendi, > > No, you can't. This feature only applies to the so-called > "external subset", not to any external parameter entities referenced > in the internal subset. For example, in the following document, the > feature can be used to suppress reading "blah.dtd", but not > "blah2.dtd" nor "blah3.dtd". > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE empty > SYSTEM "blah.dtd" > [ > <!ENTITY % dtd2 SYSTEM "blah2.dtd"> > <!ENTITY % dtd3 SYSTEM "blah3.dtd"> > %dtd2; > %dtd3; > ] > > > <empty/> > > To suppress reading certain external parameter entities, you > could register an EntityResolver with the parser (through the > setEntityResolver(EntityResolver) method). I think something like the > following will work. Return null when you want the entity to be read > as normal; return an empty input source to suppress reading of the > actual entity. > > class MyResolver implements org.xml.sax.EntityResolver { > public org.xml.sax.InputSource resolveEntity(String publicID, > String systemID) { > if (systemID != null && > systemID.equals("file:///E:/users/henry/blah2.dtd99")) > return new org.xml.sax.InputSource(new > java.io.StringReader("")); > else > return null; > } > } > > I hope that helps. > > Thanks, > > Henry > ------------------------------------------------------------------------ > Henry Zongaro XML Parsers development > IBM SWS Toronto Lab Tie Line 778-6044; Phone 985.366.1074 > mailto:hvillarreal@example.net > > Please respond to hvillarreal@example.net > > To: hvillarreal@example.net > cc: > Subject: Re: do not load external dtd > > Can you stop the parser in the middle of parser and turn this feature > on? Like if a document referenced multiple DTDs and you wanted to load > one but not the other? Thanks, Wendi > > Elena Litani wrote: > > > > James, > > > > You can use the following feature: > > http://apache.org/xml/features/nonvalidating/load-external-dtd. > > > > For more info visit: http://xml.apache.org/xerces-j/features.html > > -- Wendi Sisson Systems Programmer International Trade Development FedEx Services 985.366.1074 --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Tue Sep 04 21:31:33 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 98765 invoked by uid 500); 4 Sep 2001 21:31:33 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 98738 invoked from network); 4 Sep 2001 21:31:32 -0000 From: hvillarreal@example.net Importance: Normal Subject: Re: Relative paths in SchemaLocation and Import To: hvillarreal@example.net X-Mailer: Lotus Notes Release 5.0.4a July 24, 2000 Message-ID: <hvillarreal@example.net> Date: Tue, 4 Sep 2001 17:31:35 -0400 X-MIMETrack: Serialize by Router on D25ML04/25/M/IBM(Release 5.0.5 |September 22, 2000) at 09/04/2001 05:31:37 PM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi John, The only thing you can do if the way Xerces does Entity resolution doesn't work for you--and it may well not work for you, it certainly can't work for everyone :-)--is to create your own EntityResolver and register it with your parser. Look at the docs for the org.xml.sax.EntityResolver interface for details on how this works; it's really not that hard. Hope that helps, Neil Neil Graham XML Parser Development IBM Toronto Lab Phone: 985.366.1074, T/L 778-3519 E-mail: hvillarreal@example.net "John Powell" <hvillarreal@example.net> on 08/30/2001 11:41:27 AM Please respond to hvillarreal@example.net To: "Xerces-J-User" <hvillarreal@example.net> cc: Subject: Relative paths in SchemaLocation and Import Hi, I need to have one schema import another one, but I don't want to use an absolute path in the import. I have <xsd:import namespace="http://www.ara.com/base" schemaLocation="base.xsd"/> in another schema named ext.xsd. Both schemas are in a folder called D:\Schemas and my instance files are in a folder called D:\Instances. When I validate an instance using xerces v1.4.3, I get a fatal error stating file:///D:/instances/base.xsd not found. Is there a way to indicate that the schema should be relative to the importing schema rather than the instance file? John --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Tue Sep 04 21:37:53 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 10697 invoked by uid 500); 4 Sep 2001 21:37:53 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 10604 invoked from network); 4 Sep 2001 21:37:50 -0000 From: hvillarreal@example.net Importance: Normal Subject: Re: Access to validator info To: hvillarreal@example.net X-Mailer: Lotus Notes Release 5.0.4a July 24, 2000 Message-ID: <hvillarreal@example.net> Date: Tue, 4 Sep 2001 17:37:54 -0400 X-MIMETrack: Serialize by Router on D25ML04/25/M/IBM(Release 5.0.5 |September 22, 2000) at 09/04/2001 05:37:55 PM MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Vlad, You're right, it would be difficult to cache grammars in Xerces1. This= is largely due to the fact that Xerces1 uses a StringPool--that is, in its= grammar representation it uses integer handles instead of String references. This is (in principle anyway) very efficient; the only tro= uble is that it means that, when you parse a grammar, it becomes dependent o= n that particular StringPool. Since the symbols from instance documents = also live in the StringPool--and the same one as those of the grammars that validate the instance document--the situation becomes wellnigh insolubl= e. That was one of the many reasons for moving on to Xerces2. We can actu= ally have a sensible grammar caching scheme there. And the more people that= help with Xerces2 the faster we'll have it too. :-) Cheers, Neil Neil Graham XML Parser Development IBM Toronto Lab Phone: 985.366.1074, T/L 778-3519 E-mail: hvillarreal@example.net hvillarreal@example.net on 08/31/2001 11:23:57 AM Please respond to hvillarreal@example.net To: xerces-j-user <hvillarreal@example.net> cc: Subject: Re: Access to validator info Hi there. Sounds like you guys have a very good understanding of how Xerces parse= r works. Can you please tell what you think it would take and what needs to be d= one in general to modify Xerces1 to cache schema grammar and use it to validate different XML files? I looked at doing that but it seems to me that processed schema is atta= ched to XML document that we are validating and it will take a lot of code changes to separate them. Vlad Please respond to xerces-j-user <hvillarreal@example.net> To: xerces-j-user <hvillarreal@example.net> cc: Subject: Re: Access to validator info On Fri, 31 Aug 2001, Andreas [iso-8859-1] Th=F6nnessen wrote: > Which parser provides the method getValidator()? > I couldn't find it in the apidocs (Xerces-J 1.4.1/1.4.3/2.0.0.beta2) > Do I have to set up the Grammar, XMLValidator etc. manually for a > "customized" parser? That's what I hoped to avoid ;-) I subclassed DOMParser: public class MemeDOMParser extends org.apache.xerces.parsers.DOMParser { public StringPool getStringPool() { return this.fStringPool; } public XMLValidator getValidator() { return this.fValidator; } } fValidator is protected. > > InsertableElementsInfo info =3D > > this.makeInfoObject (node); > > Do you construct thie InsertableElementsInfo completely new (e.g. > based on the schema tree - should be easy), or is it possible to get > (at least) the possibleChildren[] from where ever the > parser/validator stored this info on parsing the DTD/schema? I'm not sure I understand your question, but here's the relevant method= . (I probably should have just tarred the files up and sent them whole): public InsertableElementsInfo makeInfoObject (Node n) { InsertableElementsInfo info =3D new InsertableElementsI= nfo(); Node parent =3D n.getParentNode(); NodeList children =3D parent.getChildNodes(); int childCount =3D children.getLength(); info.curChildren =3D new QName[childCount]; info.childCount =3D childCount; for (int i =3D 0; i < info.childCount; i++) { Node child =3D children.item(i); int index =3D this.getElementIndex(child.getNodeNam= e()); info.curChildren[i] =3D new QName(-1, index, index)= ; if (child =3D=3D n) { info.insertAt =3D i; info.curChildren[i] =3D null; } } return (info); } > > Grammar g =3D val.getGrammar(); > > Again I cannot see the method getGrammar() in the apidocs of > XMLValidator!? After poking around my code, I discovered that I actually added getGrammar() to XMLValidator: public Grammar getGrammar() { return(this.fGrammar); } and made my clients use that modified version of Xerces. Ouch. Perhaps this makes this approach unusable by you. In general, I found that there were useful methods that I wanted to use= in Xerces, but that they were no longer supported. I could get things working, but it took modifications (I don't think that was the only pla= ce where I modified Xerces). I think that Xerces2 is going to support validator access in a more direct fashion. j --- "Users complain that they receive too much spam, while spammers protes= t messages are legal." -InfoWorld "You do not have to do everything disagreeable that you have a right t= o do." -Judith Martin (Miss Manners) --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net = --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Tue Sep 04 21:38:35 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 12097 invoked by uid 500); 4 Sep 2001 21:38:35 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 12078 invoked from network); 4 Sep 2001 21:38:35 -0000 Message-ID: <hvillarreal@example.net> Date: Tue, 4 Sep 2001 14:38:35 -0700 (PDT) From: Nosa Bart <hvillarreal@example.net> Subject: RE: Problem with getElementById To: hvillarreal@example.net In-Reply-To: <hvillarreal@example.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Thanks for your input. Any idea how I can define the attribute ("id") to be of type ID (other than through a DTD)? Also, what I don't understand is how the "id" attributes are correctly recognized as being of type ID (without any DTD) when they occur in the original XML file that I read in and parse to create the DOM, but the new elements added to the tree are not recognized as having an "id" attribute of type ID. I'm actually using IBM's XML4J 3.2.0, but I also got the same problem with the latest Oracle parser. I have noticed that the javadoc states that "attributes with the name "ID" are not of type ID unless so defined" but doesn't say how you would define them. I guess using a dtd is one way of defining it, as you have suggested. Thanks again for your help. - Nosa --- "Arnold, Curt" <hvillarreal@example.net> wrote: > An attribute is only added to the ID map used by > getElementById() if it is defined to be of type ID > in a document type declaration. If you don't have a > DTD or your new element isn't defined in the > DTD or the desired attribute (by convention "id") > defined as ID type, then things will not behave as > expected. > > If all those things are followed then it should > work, however you might try turning validation on. > > Identifying the version of xerces-j being used may > be helpful in case it is actually a bug. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > hvillarreal@example.net > For additional commands, e-mail: > hvillarreal@example.net > __________________________________________________ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Tue Sep 04 21:48:14 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 28968 invoked by uid 500); 4 Sep 2001 21:48:14 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 28947 invoked from network); 4 Sep 2001 21:48:13 -0000 Message-ID: <hvillarreal@example.net> Date: Tue, 04 Sep 2001 16:52:25 -0500 From: Wendi Sisson <hvillarreal@example.net> Organization: FedEx Services X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: hvillarreal@example.net Subject: build a Document that's valid for a DTD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N We have an app that is building various XML documents from various DTDs. I don't want to have to hard-code a different method for every XML document I'm building. Is there a way to "parse" a DTD and then build the XML as I iterate over the DTD? Or perhaps a tool or utility that makes this easier? Or even some way to check before/during adding an element whether it is valid for that DTD? Thanks, Wendi -- Wendi Sisson Systems Programmer International Trade Development FedEx Services 985.366.1074 --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Tue Sep 04 21:50:20 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 33267 invoked by uid 500); 4 Sep 2001 21:50:20 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 33254 invoked from network); 4 Sep 2001 21:50:20 -0000 Message-ID: <hvillarreal@example.net> Date: Tue, 04 Sep 2001 16:55:01 -0500 From: Wendi Sisson <hvillarreal@example.net> Organization: FedEx Services X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: hvillarreal@example.net Subject: isKidOK method Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N CoreDocumentImpl has a method isKidOK. The documentation says it will "check whether the proposed tree structure is legal." What does legal mean is this context? Is it with respect to the DTD? Or is it just to ensure I don't try to add an element to an attribute, etc.? Thanks, Wendi -------------------------------------------------------------------------------- -- Wendi Sisson Systems Programmer International Trade Development FedEx Services 985.366.1074 --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Tue Sep 04 23:35:59 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 96211 invoked by uid 500); 4 Sep 2001 23:35:58 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 96188 invoked from network); 4 Sep 2001 23:35:58 -0000 Message-Id: <hvillarreal@example.net> From: "HORE, Dipak" <hvillarreal@example.net> To: hvillarreal@example.net Subject: RE: build a Document that's valid for a DTD Date: Wed, 5 Sep 2001 09:44:14 +1000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Wendi, You can try 'Turbo XML' from Extensibility, to create XML Instances (from DTD) most intuitive. You can download a free eval from the site. Ta -Dipak -----Original Message----- From: Wendi Sisson [mailto:hvillarreal@example.net] Sent: Wednesday, 5 September 2001 7:52 AM To: hvillarreal@example.net Subject: build a Document that's valid for a DTD We have an app that is building various XML documents from various DTDs. I don't want to have to hard-code a different method for every XML document I'm building. Is there a way to "parse" a DTD and then build the XML as I iterate over the DTD? Or perhaps a tool or utility that makes this easier? Or even some way to check before/during adding an element whether it is valid for that DTD? Thanks, Wendi -- Wendi Sisson Systems Programmer International Trade Development FedEx Services 985.366.1074 --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Wed Sep 05 04:13:53 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 21110 invoked by uid 500); 5 Sep 2001 04:13:53 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 21101 invoked from network); 5 Sep 2001 04:13:53 -0000 Message-Id: <hvillarreal@example.net> Date: Wed, 5 Sep 2001 04:13:55 +0000 (Asia/Calcutta) From: Pavani Mukthipudi <hvillarreal@example.net> Reply-To: Pavani Mukthipudi <hvillarreal@example.net> Subject: Re: isKidOK method To: hvillarreal@example.net MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Content-MD5: aVHUo5MExf4tei89z+UFbg== X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.4 SunOS 5.8 sun4u sparc X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N CoreDocumentImpl's isKidOK() method doesn't check wrt the DTD. Checks whether or not a given child node type is allowed, for example, a Document node can have Element,PI,Comment,DocType nodes as children;a Text node cannot have an Element node as a child... regards, Pavani > Mailing-List: contact hvillarreal@example.net; run by ezmlm > list-help: <mailto:hvillarreal@example.net> > list-unsubscribe: <mailto:hvillarreal@example.net> > list-post: <mailto:hvillarreal@example.net> > Delivered-To: mailing list hvillarreal@example.net > Date: Tue, 04 Sep 2001 16:55:01 -0500 > From: Wendi Sisson <hvillarreal@example.net> > X-Accept-Language: en > To: hvillarreal@example.net > Subject: isKidOK method > Content-Transfer-Encoding: 7bit > X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > > CoreDocumentImpl has a method isKidOK. The documentation says it will > "check whether the proposed tree structure is legal." What does legal > mean is this context? Is it with respect to the DTD? Or is it just to > ensure I don't try to add an element to an attribute, etc.? Thanks, > Wendi > > -------------------------------------------------------------------------------- > > -- > Wendi Sisson > Systems Programmer > International Trade Development > FedEx Services > 985.366.1074 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: hvillarreal@example.net > For additional commands, e-mail: hvillarreal@example.net > -- Pavani Mukthipudi Sun Microsystems Inc. Phone: 080 - 2298989 Extn: 87390 --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Wed Sep 05 05:24:12 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 65845 invoked by uid 500); 5 Sep 2001 05:24:11 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 65836 invoked from network); 5 Sep 2001 05:24:11 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.4712.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: specifying the XML schema in the Document object using xerces1.4.3 Date: Wed, 5 Sep 2001 10:50:31 +0530 Message-ID: <hvillarreal@example.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: specifying the XML schema in the Document object using xerces1.4.3 Thread-Index: AcE1y2PIpfbFlKGsEdWnfgCw0Eg7gw== From: "abhishekhp" <hvillarreal@example.net> To: <hvillarreal@example.net> X-OriginalArrivalTime: 05 Sep 2001 05:20:32.0174 (UTC) FILETIME=[7BEADCE0:01C135CA] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, I have a requirement in which i need to send messages in xml format in strings. i.e. the message will be a string which will be in xml form. To do that I am building a Document object and then converting it to a string. This xml message will be validated against an XML Schema. How do I specify the following in the Document object: <personl xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=3D"http://localhost/XML/XSD1.xsd"> If this line is not present in the generated xml, it will not be validated. If I were using a DTD instead of an XML Schema to validate this document, I would use the following method. doc.setDoctype("dtd", "Person.dtd", ""); What is the corresponding method to be used for an XML Schema? If there something wrong in this approach, could someone suggest another approach? Please reply back at my mail id too, hvillarreal@example.net TIA, abhishek. e.g.=20 DocumentImpl doc =3D new DocumentImpl(); =09 doc.setDoctype("dtd", "Person.dtd", ""); // this is the problematic line Element root =3D doc.createElement("person"); Element name =3D doc.createElement("Name"); Text namevalue =3D doc.createTextNode("William"); name.appendChild(namevalue); root.appendChild(name); doc.appendChild(root); --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Wed Sep 05 07:32:24 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 47694 invoked by uid 500); 5 Sep 2001 07:32:24 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 47684 invoked from network); 5 Sep 2001 07:32:23 -0000 Message-ID: <008801c135dd$511b1b20$e16ce540@winme> From: "Harden ZHU" <hvillarreal@example.net> To: <hvillarreal@example.net> References: <hvillarreal@example.net> Subject: XML Public Indentifier Date: Wed, 5 Sep 2001 03:35:20 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi I have some XML docs as <!DOCTYPE Catalog PUBLIC "-//PubCatalog" "http://www.xyz.com/catalog.dtd"> I don't know how public indentifier works. Is "-//PubCatalog" a URI? And How parser find it and work with it? Thanks Harden --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Wed Sep 05 07:57:39 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 66925 invoked by uid 500); 5 Sep 2001 07:57:38 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 66898 invoked from network); 5 Sep 2001 07:57:38 -0000 Date: Wed, 5 Sep 2001 17:57:24 +1000 From: Dmitri Colebatch <hvillarreal@example.net> X-Sender: hvillarreal@example.net To: hvillarreal@example.net Subject: Re: XML Public Indentifier In-Reply-To: <008801c135dd$511b1b20$e16ce540@winme> Message-ID: <hvillarreal@example.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N When the parser first requires the dtd it will get it from the url (http://www.xyz.com/catalog.dtd), and then store it in a cache keyed on "-//PubCatalog". any future requests for the same dtd ("-//PubCatalog") will be served by the cache. I think there is a way to make the dtd known straight off without the initial request, but am not sure. the above is just based on the understanding I've gathered from use, so may not be entirely accurate. hth dim On Wed, 5 Sep 2001, Harden ZHU wrote: > Hi > > I have some XML docs as > <!DOCTYPE Catalog PUBLIC "-//PubCatalog" "http://www.xyz.com/catalog.dtd"> > > I don't know how public indentifier works. Is "-//PubCatalog" a URI? And How > parser find it and work with it? > > Thanks > > Harden > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: hvillarreal@example.net > For additional commands, e-mail: hvillarreal@example.net > > --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Wed Sep 05 09:32:47 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 35817 invoked by uid 500); 5 Sep 2001 09:32:46 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 35807 invoked from network); 5 Sep 2001 09:32:46 -0000 Message-Id: <hvillarreal@example.net> Date: Wed, 5 Sep 2001 09:32:46 +0000 (Asia/Calcutta) From: Pavani Mukthipudi <hvillarreal@example.net> Reply-To: Pavani Mukthipudi <hvillarreal@example.net> Subject: Re: XML Public Indentifier To: hvillarreal@example.net MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Content-MD5: hbdojaGcHDVKc/qLzEn8Gg== X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.4 SunOS 5.8 sun4u sparc X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Harden ZHU wrote : > I don't know how public indentifier works. Is "-//PubCatalog" a URI? Each resource is associated with a constant identifier.This identifier is associated with a physical location in a registry created and maintained by a central authority. If the physical location changes,the change needs to be registered only in the registry which is an advantage over using system ids. XML requires that if a Formal Public Identifier (FPI) is provided, system id must also be provided. An XML processor attempting to retrieve the entity's content uses the public identifier to generate an alternative URI reference.If the processor is unable to do so, it must use the URI reference specified in the system id. pubid 888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4= standards_org "//" owner "//" title "//" language standards_org 888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4= "ISO" | "+" | "-" ISO for ISO-approved documents + for documents approved by some other standards body - for everything else Pavani -- Pavani Mukthipudi Sun Microsystems Inc. Phone: 080 - 2298989 Extn: 87390 --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Wed Sep 05 10:56:52 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 58717 invoked by uid 500); 5 Sep 2001 10:56:52 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 58708 invoked from network); 5 Sep 2001 10:56:51 -0000 Message-Id: <hvillarreal@example.net> Date: Wed, 5 Sep 2001 10:56:48 +0000 (Asia/Calcutta) From: Pavani Mukthipudi <hvillarreal@example.net> Reply-To: Pavani Mukthipudi <hvillarreal@example.net> Subject: Re: specifying the XML schema in the Document object using xerces1.4.3 To: hvillarreal@example.net MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Content-MD5: 7NcZObXYDpoLa6KK57OYzg== X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.4 SunOS 5.8 sun4u sparc X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Try adding these statements. root.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); root.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance", "xsi:noNamespaceSchemaLocation", "http://localhost/XML/XSD1.xsd"); Pavani > Mailing-List: contact hvillarreal@example.net; run by ezmlm > list-help: <mailto:hvillarreal@example.net> > list-unsubscribe: <mailto:hvillarreal@example.net> > list-post: <mailto:hvillarreal@example.net> > Delivered-To: mailing list hvillarreal@example.net > X-MimeOLE: Produced By Microsoft Exchange V6.0.4712.0 > content-class: urn:content-classes:message > Subject: specifying the XML schema in the Document object using xerces1.4.3 > Date: Wed, 5 Sep 2001 10:50:31 +0530 > X-MS-Has-Attach: > X-MS-TNEF-Correlator: > Thread-Topic: specifying the XML schema in the Document object using xerces1.4.3 > Thread-Index: AcE1y2PIpfbFlKGsEdWnfgCw0Eg7gw== > From: "abhishekhp" <hvillarreal@example.net> > To: <hvillarreal@example.net> > X-OriginalArrivalTime: 05 Sep 2001 05:20:32.0174 (UTC) FILETIME=[7BEADCE0:01C135CA] > X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > Content-Transfer-Encoding: 8bit > X-MIME-Autoconverted: from quoted-printable to 8bit by blr-root.India.Sun.COM id KAA29288 > > Hi, > I have a requirement in which i need to send messages in xml format in > strings. i.e. the message will be a string which will be in xml form. To > do that I am building a Document object and then converting it to a > string. This xml message will be validated against an XML Schema. How do > I specify the following in the Document object: > > <personl xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:noNamespaceSchemaLocation="http://localhost/XML/XSD1.xsd"> > > If this line is not present in the generated xml, it will not be > validated. If I were using a DTD instead of an XML Schema to validate > this document, I would use the following method. > doc.setDoctype("dtd", "Person.dtd", ""); > What is the corresponding method to be used for an XML Schema? > > If there something wrong in this approach, could someone suggest > another approach? > Please reply back at my mail id too, hvillarreal@example.net > > TIA, > abhishek. > > e.g. > DocumentImpl doc = new DocumentImpl(); > > doc.setDoctype("dtd", "Person.dtd", > ""); // this is the problematic line > > Element root = > doc.createElement("person"); > Element name = > doc.createElement("Name"); > > Text namevalue = > doc.createTextNode("William"); > > name.appendChild(namevalue); > > root.appendChild(name); > > doc.appendChild(root); > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: hvillarreal@example.net > For additional commands, e-mail: hvillarreal@example.net > -- Pavani Mukthipudi Sun Microsystems Inc. Phone: 080 - 2298989 Extn: 87390 --------------------------------------------------------------------- To unsubscribe, e-mail: hvillarreal@example.net For additional commands, e-mail: hvillarreal@example.net From xerces-j-hvillarreal@example.net Wed Sep 05 11:17:17 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 85643 invoked by uid 500); 5 Sep 2001 11:17:17 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 85621 invoked from network); 5 Sep 2001 11:17:16 -0000 Message-ID: <hvillarreal@example.net> From: "Giuseppe Sarno" <hvillarreal@example.net> To: hvillarreal@example.net Subject: Load DTD or Schema in memory. Date: Wed, 5 Sep 2001 12:16:19 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C135FC.2FCDED20" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C135FC.2FCDED20 Content-Type: text/plain; charset="iso-8859-1" Hi , I was wondering , in case is needed to parse a lot of XML docs , is it possible to load the DTD or Schema one in memory and always reuse it instead of reloading it for each Doc validation ? cheers. ------_=_NextPart_001_01C135FC.2FCDED20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Diso-8859-1"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2654.89"> <TITLE>Load DTD or Schema in memory.</TITLE> </HEAD> <BODY> <P><FONT SIZE=3D2 FACE=3D"Arial">Hi ,</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">I was wondering ,</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">in case is needed to parse a lot of = XML docs , is it possible to </FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">load the DTD or Schema one in memory = and always reuse it instead of reloading it for each Doc validation = ?</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">cheers.</FONT> </P> </BODY> </HTML> ------_=_NextPart_001_01C135FC.2FCDED20-- From xerces-j-hvillarreal@example.net Wed Sep 05 11:48:24 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 14799 invoked by uid 500); 5 Sep 2001 11:48:24 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 14787 invoked from network); 5 Sep 2001 11:48:23 -0000 Message-ID: <hvillarreal@example.net> From: "Giuseppe Sarno" <hvillarreal@example.net> To: hvillarreal@example.net Subject: exception turning validation off. Date: Wed, 5 Sep 2001 12:47:20 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C13600.85349440" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C13600.85349440 Content-Type: text/plain; charset="iso-8859-1" I disactivaded the Validation parser.setFeature("http://xml.org/sax/features/validation",false); parser.setFeature("http://xml.org/sax/features/namespaces",false); and when I run the server I get this exception: hvillarreal@example.net(XMLParser.java:1094) anyone knows why ? cheers. ------_=_NextPart_001_01C13600.85349440 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Diso-8859-1"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2654.89"> <TITLE>exception turning validation off.</TITLE> </HEAD> <BODY> <P><FONT SIZE=3D2 FACE=3D"Arial">I disactivaded the Validation</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">parser.setFeature(&quot;<A = HREF=3D"http://xml.org/sax/features/validation" = TARGET=3D"_blank">http://xml.org/sax/features/validation</A>&quot;,false= );</FONT> <BR><FONT SIZE=3D2 = FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb= sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parser.setFeature(&quot;<A = HREF=3D"http://xml.org/sax/features/namespaces" = TARGET=3D"_blank">http://xml.org/sax/features/namespaces</A>&quot;,false= );</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">and when I run the server I get this = exception:</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">java.lang.NullPointerException</FONT> <BR><FONT SIZE=3D2 = FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at = org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1094)</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">anyone knows why ?</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">cheers.</FONT> </P> </BODY> </HTML> ------_=_NextPart_001_01C13600.85349440-- From xerces-j-hvillarreal@example.net Wed Sep 05 12:30:27 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 76296 invoked by uid 500); 5 Sep 2001 12:30:27 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 76251 invoked from network); 5 Sep 2001 12:30:26 -0000 Message-ID: <hvillarreal@example.net> From: Tony Nys <hvillarreal@example.net> To: "'hvillarreal@example.net'" <hvillarreal@example.net> Subject: RE: Load DTD or Schema in memory. Date: Wed, 5 Sep 2001 14:27:48 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.1960.3) Content-Type: multipart/alternative; boundary="---- =_NextPart_001_01C13606.2C847FA0" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------ =_NextPart_001_01C13606.2C847FA0 Content-Type: text/plain is under investigation for xerces 2.0 -----Original Message----- From: Giuseppe Sarno [mailto:hvillarreal@example.net] Sent: Wednesday, September 05, 2001 1:16 PM To: hvillarreal@example.net Subject: Load DTD or Schema in memory. Hi , I was wondering , in case is needed to parse a lot of XML docs , is it possible to load the DTD or Schema one in memory and always reuse it instead of reloading it for each Doc validation ? cheers. ------ =_NextPart_001_01C13606.2C847FA0 Content-Type: text/html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <TITLE>Load DTD or Schema in memory.</TITLE> <META content="MSHTML 6.00.2462.0" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=688482812-05092001><FONT face=Arial color=#0000ff size=2>is under investigation for xerces 2.0</FONT></SPAN></DIV> <BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"> <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Giuseppe Sarno [mailto:hvillarreal@example.net]<BR><B>Sent:</B> Wednesday, September 05, 2001 1:16 PM<BR><B>To:</B> hvillarreal@example.net<BR><B>Subject:</B> Load DTD or Schema in memory.<BR><BR></FONT></DIV> <P><FONT face=Arial size=2>Hi ,</FONT> <BR><FONT face=Arial size=2>I was wondering ,</FONT> <BR><FONT face=Arial size=2>in case is needed to parse a lot of XML docs , is it possible to </FONT><BR><FONT face=Arial size=2>load the DTD or Schema one in memory and always reuse it instead of reloading it for each Doc validation ?</FONT> </P> <P><FONT face=Arial size=2>cheers.</FONT> </P></BLOCKQUOTE></BODY></HTML> ------ =_NextPart_001_01C13606.2C847FA0-- From xerces-j-hvillarreal@example.net Wed Sep 05 13:19:55 2001 Return-Path: <xerces-j-hvillarreal@example.net> Delivered-To: hvillarreal@example.net Received: (qmail 48321 invoked by uid 500); 5 Sep 2001 13:19:55 -0000 Mailing-List: contact hvillarreal@example.net; run by ezmlm Precedence: bulk Reply-To: hvillarreal@example.net list-help: <mailto:hvillarreal@example.net> list-unsubscribe: <mailto:hvillarreal@example.net> list-post: <mailto:hvillarreal@example.net> Delivered-To: mailing list hvillarreal@example.net Received: (qmail 48297 invoked from network); 5 Sep 2001 13:19:54 -0000 From: hvillarreal@example.net Importance: Normal To: hvillarreal@example.net Subject: Re: exception turning validation off. X-Mailer: Lotus Notes Release 5.0.3 (Intl) 21 March 2000 Message-ID: <hvillarreal@example.net> Date: Wed, 5 Sep 2001 09:19:57 -0400 X-MIMETrack: Serialize by Router on D25ML03/25/M/IBM(Release 5.0.5 |September 22, 2000) at 09/05/2001 09:19:59 AM, Serialize complete at 09/05/2001 09:19:59 AM
{'source': 'Apache Software Foundation Public Mail Archives'}