You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Gus Delgado <gu...@netquotient.com> on 2001/04/17 18:58:31 UTC

Test

this only a test, sorry

-----Original Message-----
From: xerces-j-dev-help@xml.apache.org
[mailto:xerces-j-dev-help@xml.apache.org]
Sent: Tuesday, April 17, 2001 11:48 AM
To: gus.delgado@netquotient.com
Subject: WELCOME to xerces-j-dev@xml.apache.org


Hi! This is the ezmlm program. I'm managing the
xerces-j-dev@xml.apache.org mailing list.

Acknowledgment: I have added the address

   gus.delgado@netquotient.com

to the xerces-j-dev mailing list.

Welcome to xerces-j-dev@xml.apache.org!

Please save this message so that you know the address you are
subscribed under, in case you later want to unsubscribe or change your
subscription address.


--- Administrative commands for the xerces-j-dev list ---

I can handle administrative requests automatically. Please
do not send them to the list address! Instead, send
your message to the correct command address:

To subscribe to the list, send a message to:
   <xe...@xml.apache.org>

To remove your address from the list, send a message to:
   <xe...@xml.apache.org>

Send mail to the following for info and FAQ for this list:
   <xe...@xml.apache.org>
   <xe...@xml.apache.org>

Similar addresses exist for the digest list:
   <xe...@xml.apache.org>
   <xe...@xml.apache.org>

To get messages 123 through 145 (a maximum of 100 per request), mail:
   <xe...@xml.apache.org>

To get an index with subject and author for messages 123-456 , mail:
   <xe...@xml.apache.org>

They are always returned as sets of 100, max 2000 per request,
so you'll actually get 100-499.

To receive all messages with the same subject as message 12345,
send an empty message to:
   <xe...@xml.apache.org>

The messages do not really need to be empty, but I will ignore
their content. Only the ADDRESS you send to is important.

You can start a subscription for an alternate address,
for example "john@host.domain", just add a hyphen and your
address (with '=' instead of '@') after the command word:
<xe...@xml.apache.org>

To stop subscription for this address, mail:
<xe...@xml.apache.org>

In both cases, I'll send a confirmation message to that address. When
you receive it, simply reply to it to complete your subscription.

If despite following these instructions, you do not get the
desired results, please contact my owner at
xerces-j-dev-owner@xml.apache.org. Please be patient, my owner is a
lot slower than I am ;-)

--- Enclosed is a copy of the request I received.

Return-Path: <gu...@netquotient.com>
Received: (qmail 77900 invoked from network); 17 Apr 2001 16:48:21 -0000
Received: from unknown (HELO ytterbium.netquotient.com) (63.73.229.4)
  by h31.sny.collab.net with SMTP; 17 Apr 2001 16:48:21 -0000
Received: from gus (208.33.52.127 [208.33.52.127]) by
ytterbium.netquotient.com with SMTP (Microsoft Exchange Internet Mail
Service Version 5.5.2650.21)
	id 2JZ7SMCR; Tue, 17 Apr 2001 11:48:25 -0500
From: "Gus Delgado" <gu...@netquotient.com>
To:
<xerces-j-dev-sc.987525279.dcpkikejllkcgaoakmbo-gus.delgado=netquotient.com@
xml.apache.org>
Subject: RE: confirm subscribe to xerces-j-dev@xml.apache.org
Date: Tue, 17 Apr 2001 11:48:17 -0500
Message-ID: <NE...@netquotient.com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
In-Reply-To: <98...@xml.apache.org>
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Importance: Normal
X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N



-----Original Message-----
From: xerces-j-dev-help@xml.apache.org
[mailto:xerces-j-dev-help@xml.apache.org]
Sent: Tuesday, April 17, 2001 11:35 AM
To: gus.delgado@netquotient.com
Subject: confirm subscribe to xerces-j-dev@xml.apache.org


Hi! This is the ezmlm program. I'm managing the
xerces-j-dev@xml.apache.org mailing list.

To confirm that you would like

   gus.delgado@netquotient.com

added to the xerces-j-dev mailing list, please send
an empty reply to this address:


xerces-j-dev-sc.987525279.dcpkikejllkcgaoakmbo-gus.delgado=netquotient.com@x
ml.apache.org

Usually, this happens when you just hit the "reply" button.
If this does not work, simply copy the address and paste it into
the "To:" field of a new message.

This confirmation serves two purposes. First, it verifies that I am able
to get mail through to you. Second, it protects you in case someone
forges a subscription request in your name.

Some mail programs are broken and cannot handle long addresses. If you
cannot reply to this request, instead send a message to
<xe...@xml.apache.org> and put the
entire address listed above into the "Subject:" line.


--- Administrative commands for the xerces-j-dev list ---

I can handle administrative requests automatically. Please
do not send them to the list address! Instead, send
your message to the correct command address:

To subscribe to the list, send a message to:
   <xe...@xml.apache.org>

To remove your address from the list, send a message to:
   <xe...@xml.apache.org>

Send mail to the following for info and FAQ for this list:
   <xe...@xml.apache.org>
   <xe...@xml.apache.org>

Similar addresses exist for the digest list:
   <xe...@xml.apache.org>
   <xe...@xml.apache.org>

To get messages 123 through 145 (a maximum of 100 per request), mail:
   <xe...@xml.apache.org>

To get an index with subject and author for messages 123-456 , mail:
   <xe...@xml.apache.org>

They are always returned as sets of 100, max 2000 per request,
so you'll actually get 100-499.

To receive all messages with the same subject as message 12345,
send an empty message to:
   <xe...@xml.apache.org>

The messages do not really need to be empty, but I will ignore
their content. Only the ADDRESS you send to is important.

You can start a subscription for an alternate address,
for example "john@host.domain", just add a hyphen and your
address (with '=' instead of '@') after the command word:
<xe...@xml.apache.org>

To stop subscription for this address, mail:
<xe...@xml.apache.org>

In both cases, I'll send a confirmation message to that address. When
you receive it, simply reply to it to complete your subscription.

If despite following these instructions, you do not get the
desired results, please contact my owner at
xerces-j-dev-owner@xml.apache.org. Please be patient, my owner is a
lot slower than I am ;-)

--- Enclosed is a copy of the request I received.

Return-Path: <gu...@netquotient.com>
Received: (qmail 54408 invoked from network); 17 Apr 2001 16:34:29 -0000
Received: from unknown (HELO ytterbium.netquotient.com) (63.73.229.4)
  by h31.sny.collab.net with SMTP; 17 Apr 2001 16:34:29 -0000
Received: from gus (208.33.52.127 [208.33.52.127]) by
ytterbium.netquotient.com with SMTP (Microsoft Exchange Internet Mail
Service Version 5.5.2650.21)
	id 2JZ7SMBY; Tue, 17 Apr 2001 11:34:33 -0500
From: "Gus Delgado" <gu...@netquotient.com>
To: <xe...@xml.apache.org>
Subject: subscribe
Date: Tue, 17 Apr 2001 11:34:26 -0500
Message-ID: <NE...@netquotient.com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Importance: Normal
X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N

subscribe

Gus Delgado
Consultant
Net Quotienet Consulting Group
e-mail:gus.delgado@netquotient.com
cell: 512-587-6986


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


archives for this mailing list

Posted by Gus Delgado <gu...@netquotient.com>.
Does anyone know where the archive for this mailing list is located, I tried
this url http://xml-archive.webweaving.org/

... and it send me to this one:
http://archive.covalent.net

... but still nothing?

anyone?

thanks,
gus


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


RE: Validating...

Posted by Gus Delgado <gu...@netquotient.com>.
I'm running into a new problem, I keep getting an
Error:org.xml.sax.SAXParserException: Element type "ELEMENT_NAME" must be
declared

I get that for every single element in my xml (THE XML DOESN'T HAVE THE DTD
ON IT, I.E. DOCTYPE  NAME SYSTEM "DTD.DTD")

this is a snip of my code:

public class MyDefaultHandler extends DefaultHandler implements ErrorHandler
{

public void validate(InputStream theStream){
...
XMLReader theReader = parser.getXMLReader();
// Activate Validation
String validation = "http://xml.org/sax/features/validation";
theReader.setFeature(validation, true);

 /** Create the InputStream theStream is an InputStream with has xml**/
InputSource iso = new InputSource(theStream);
URL u = new URL("http://myhost/example/mydtd.dtd");
iso.setSystemId(u.toString());

/** Set Handlers **/
theReader.setContentHandler(this);
theReader.setEntityResolver(this);
theReader.setErrorHandler(this);
theReader.parse(iso);
}

public InputSource resolveEntity(String publicId, String systemId)
    throws SAXException
    {
        InputSource i = null;
        if (! systemId.startsWith("http://myhost/example/")) {
            // XML tries to use different DTD
            throw new SAXException("Must use " + SYSTEM_ID_PREFIX
            + "mydtd.dtd for this config file");
        }

        try{
            URL dtdURL = new URL("http://myhost/example/mydtd.dtd");

            if (dtdURL == null) {
                throw new SAXException("Can't find mydtd.dtd");
            }else{
                System.out.println("found DTD");
            }
            i = new InputSource(dtdURL.toString());

        }catch(Exception ssa){}
        return i;
    }

    public void error (SAXParseException e)
        throws SAXException
    {
        System.out.println("ERROR:" + e);
    }

    public void fatalError(SAXParseException e)
        throws SAXException
    {
        System.out.println("FATAL_ERROR:" + e);
    }

    public void warning(SAXParseException e)
        throws SAXException
    {
        System.out.println("WARNING:" + e);
    }

...when I run it, it goes into the error method for the ErrorHandler
interface and it prints out the error above.  Any ideas what am I doing
wrong? How can I register the DTD to validate the xml?  Your help will be
very appeciated, I've been working on this for a while now.  thanks.

Gus Delgado
Consultant
Net Quotienet Consulting Group
e-mail:gus.delgado@netquotient.com
cell: 512-587-6986

-----Original Message-----
From: Andy Clark [mailto:andyc@apache.org]
Sent: Wednesday, April 18, 2001 9:23 PM
To: xerces-j-dev@xml.apache.org
Subject: Re: Validating...


Gus Delgado wrote:
> I'm not really sure how to do that?! is there any sample code that
> I can look at?

  interface org.xml.sax.EntityResolver
  method setEntityResolver

I don't feel like writing yet another sample. Check the mailing
list archives for one of my previous posts on this topic.

--
Andy Clark * IBM, TRL - Japan * andyc@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: Validating...

Posted by Andy Clark <an...@apache.org>.
Gus Delgado wrote:
> I'm not really sure how to do that?! is there any sample code that 
> I can look at?

  interface org.xml.sax.EntityResolver
  method setEntityResolver

I don't feel like writing yet another sample. Check the mailing
list archives for one of my previous posts on this topic.

-- 
Andy Clark * IBM, TRL - Japan * andyc@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


RE: Validating...

Posted by Gus Delgado <gu...@netquotient.com>.
I'm not really sure how to do that?! is there any sample code that I can
look at?

thanks
gus

-----Original Message-----
From: Andy Clark [mailto:andyc@apache.org]
Sent: Wednesday, April 18, 2001 3:01 AM
To: xerces-j-dev@xml.apache.org
Subject: Re: Validating...


Gus Delgado wrote:
>       DOMParser parser = new DOMParser();
> [...]
> ...The XML has a <!DOCTYPE MORTGAGEDATA SYSTEM
> "http://myhost/dtd/Flood.dtd">
>
> what am I doing wrong?

Write an entity resolver that will return the DTD that is
referenced in the serialized document. Then just register
it with the parser and you should be good to go.

--
Andy Clark * IBM, TRL - Japan * andyc@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: Validating...

Posted by Andy Clark <an...@apache.org>.
Gus Delgado wrote:
>       DOMParser parser = new DOMParser();
> [...]
> ...The XML has a <!DOCTYPE MORTGAGEDATA SYSTEM
> "http://myhost/dtd/Flood.dtd">
> 
> what am I doing wrong?

Write an entity resolver that will return the DTD that is
referenced in the serialized document. Then just register
it with the parser and you should be good to go.

-- 
Andy Clark * IBM, TRL - Japan * andyc@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Validating...

Posted by Gus Delgado <gu...@netquotient.com>.
...xml with external DTD inside your code. I'm kind of new to xerces:
I'm trying to validate some xml I received as a Document against an external
DTD how would I go about doing that with xerces.

This is what I've try so far. I was not successful.

public Element request(Document root){
	OutputFormat    format  = new OutputFormat( root );
      XMLSerializer    serial = new XMLSerializer( format );
      serial.asDOMSerializer();
      serial.serialize( root.getDocumentElement() );

      DOMParser parser = new DOMParser();
      parser.setFeature( "http://xml.org/sax/features/validation", true );
      parser.setFeature( "http://apache.org/xml/features/validation/schema",
true );
}

...The XML has a <!DOCTYPE MORTGAGEDATA SYSTEM
"http://myhost/dtd/Flood.dtd">

what am I doing wrong?

Your help is greatly appreciated...

gus


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org