🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.xml
Article #9973

Re: validacja XML by XSD a problem namespace w SAXParser

#9973
From: Andrew Cohen
Date: Mon, 15 Sep 2008 18:41
18 lines
1684 bytes
abc_javy pisze:
> obojetnie czy dac w metodzie  Saxa
> saxBuilder.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",
> new File(pathfilexsd).toURI().toString());
>  czy
> saxBuilder.setProperty("http://apache.org/xml/properties/schema/external-schemaLocation",
> new File(pathfilexsd).toURI().toString());

   Zmieniłem na:
            saxBuilder.setProperty("http://apache.org/xml/properties/schema/external-schemaLocation",
                    "http://www.mswia.gov.pl/standardy/ndap "+
                    new File(pathfilexsd).toURI().toString());

   i wypisało, że "Validacja zako?cozna pomy?lnie". Zmieniłem tak, ponieważ w pliku XML były podane dwie rzeczy:

xsi:schemaLocation="http://www.mswia.gov.pl/standardy/ndap SpisZdawczo-odbiorczy.xsd"

http://www.w3.org/TR/xmlschema-1/#schema-loc
Technical Details
Message-ID: <gama2j$hpi$1@news.onet.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.onet.pl!not-for-mail
References: <ga36np$ahr$1@inews.gazeta.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.onet.pl!not-for-mail
From: Andrew Cohen <cohen72@o2.pl>
Newsgroups: pl.comp.lang.java,pl.comp.xml
Subject: Re: validacja XML by XSD a problem namespace w SAXParser
Date: Mon, 15 Sep 2008 20:41:52 +0200
Organization: Onet.pl
Lines: 18
Message-ID: <gama2j$hpi$1@news.onet.pl>
References: <ga36np$ahr$1@inews.gazeta.pl>
NNTP-Posting-Host: jan200.net.autocom.pl
Mime-Version: 1.0
X-Trace: news.onet.pl 1221503891 18226 77.236.6.47 (15 Sep 2008 18:38:11 GMT)
X-Complaints-To: usenet@news.onet.pl
NNTP-Posting-Date: Mon, 15 Sep 2008 18:38:11 +0000 (UTC)
X-Sender: /NXnEdMO/pH8lMVpkvxASg==
In-Reply-To: <ga36np$ahr$1@inews.gazeta.pl>
User-Agent: Thunderbird 2.0.0.16 (X11/20080707)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit