At 09.02 16/07/2004 -0600, Mariella Di Giacomo wrote:
Hi ALL,

I had the same problem on a Solaris box at the end of April and I would appreciate also some suggestions.

Mariella, Song,
the libWWW can be selected as a runConfigure option on both Solaris and MacOS, but the code will not use it.
If you have problems editing the code for Xerces, just re-run runConfigure using the option -nsocket (for Solaris) or -nnative (for MacOS).
If you really want to use libWWW, edit the sources in this way:
- for Solaris, you should edit util\Platforms\Solaris\SolarisPlatformUtils.cpp to have


#if defined (XML_USE_NETACCESSOR_LIBWWW)
    #include <xercesc/util/NetAccessors/libWWW/LibWWWNetAccessor.hpp>
#elif defined (XML_USE_NETACCESSOR_SOCKET)
    #include <xercesc/util/NetAccessors/Socket/SocketNetAccessor.hpp>
#endif

and

XMLNetAccessor* XMLPlatformUtils::makeNetAccessor()
{
#if defined (XML_USE_NETACCESSOR_LIBWWW)
    return new LibWWWNetAccessor();
#elif defined (XML_USE_NETACCESSOR_SOCKET)
    return new SocketNetAccessor();
#else
    return 0;
#endif
}

- for MacOS, you should change util\Platforms\MacOsPlatformUtils.cpp to have

#if defined(USE_URLACCESSCF)
   #include <xercesc/util/NetAccessors/MacOSURLAccessCF/MacOSURLAccessCF.hpp>
#elif defined(USE_URLACCESS)
   #include <xercesc/util/NetAccessors/MacOSURLAccess/MacOSURLAccess.hpp>
#elif defined (XML_USE_NETACCESSOR_LIBWWW)
   #include <xercesc/util/NetAccessors/libWWW/LibWWWNetAccessor.hpp>
#endif

and

XMLNetAccessor*
XMLPlatformUtils::makeNetAccessor()
{
// The selection of NetAcessor is made through
// the following preprocessor defines:
//
// XML_USE_NETACCESSOR_URLACCESS -- Use netaccessor based on URLAccess
// XML_USE_NETACCESSOR_URLACCESSCF -- Use netaccessor based on CFURLAccess (CoreFoundation based)
// XML_USE_NETACCESSOR_NATIVE -- In absence of above selections, chooses URLACCESSCF
// if targetting Carbon, and URLAccess otherwise
//
// These choices are resolved at the ^^^top^^^ of this file.


#if (defined(USE_URLACCESSCF))
    //  Use the URLAccess code that relies only on CoreFoundation
        return new MacOSURLAccessCF;
#elif (defined(USE_URLACCESS))
        //      Only try to use URLAccess if it's actually available
        if (URLAccessAvailable())
                return new MacOSURLAccess;
#elif defined (XML_USE_NETACCESSOR_LIBWWW)
        return new LibWWWNetAccessor();
#endif

        //      No netaccessor available--we can live with it, but you won't
        //      get net access.
        return 0;
}

Alberto

Thanks a lot,


Mariella




Below there is part of the message I sent some time ago and what I have done

__________________________________________________________________________
__________________________________________________________________________

I have compiled and installed Xerces-c++ 2.5.0 on Solaris 2.8 using gcc 3.3.2
The options I have given for building Xerces C++ is
./runConfigure -psolaris -cgcc -xg++ -minmem -nlibwww ­tnative -rpthread

Before doing that I have built (using the same gcc) the w3c-libwww-5.4.0
I can see that the libWWW library is used in the settings for compilation

____________________________________________________________________________
export CXXFLAGS=" -w -O -DPROJ_XMLPARSER -DPROJ_XMLUTIL -DPROJ_PARSERS -DPROJ_SAX4C -DPROJ_SAX2 -DPROJ_DOM -DPROJ_VALIDATORS -DXML_USE_NATIVE_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER -DXML_USE_PTHREADS -DXML_USE_NETACCESSOR_LIBWWW -I/...../w3c-libwww-5.4.0/include -I/......./w3c-libwww-5.4.0/include/w3c-libwww -DHAVE_CONFIG_H "


export CFLAGS="-mcpu=v9 -m64 -w -O -DPROJ_XMLPARSER -DPROJ_XMLUTIL -DPROJ_PARSERS -DPROJ_SAX4C -DPROJ_SAX2 -DPROJ_DOM -DPROJ_VALIDATORS -DXML_USE_NATIVE_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER -DXML_USE_PTHREADS -DXML_USE_NETACCESSOR_LIBWWW -I/........./w3c-libwww-5.4.0/include -I/........./w3c-libwww-5.4.0/include/w3c-libwww -DHAVE_CONFIG_H "
export LDFLAGS="-mcpu=v9 -m64 "


export LIBS=" -lpthread -L/........./w3c-libwww-5.4.0/lib -lwwwxml -lxmltok -lxmlparse -lwwwinit -lwwwapp -lwwwhtml -lwwwtelnet -lwwwnews -lwwwhttp -lwwwmime -lwwwgopher -lwwwftp -lwwwfile -lwwwdir -lwwwcache -lwwwstream -lwwwmux -lwwwtrans -lwwwcore -lwwwutils -lmd5 -ldl -lnsl -lsocket"
______________________________________________________________________________


The reason why I have built the w3c-libwww to be used with XercesC++ (NETACCESSOR="LibWWW") are the following:


1)
I need to validate XML documents using PParse (I cannot use sax.Counter) and some of the schema locations are given using http://................
2)
I understood that LibWWW in conjunction with Xerces-C++ would do it.


__________________________________________________________________________
__________________________________________________________________________










At 12:29 PM 7/14/2004 -0500, Song Li wrote:
MacOS 10.3.

Song

On Jul 14, 2004, at 11:57 AM, Alberto Massari wrote:

At 11.33 14/07/2004 -0500, Song Li wrote:
Thanks! so which option I should select while compiling? I tried "libwww'" but still doesn't work... more suggestion?

Hi Song, on which platform are you working?

Alberto


Song

On Jul 14, 2004, at 10:16 AM, Alberto Massari wrote:

At 16.46 13/07/2004 -0500, Song Li wrote:
Hi, gurus,

A newbie's question; when I parse an XML file with a line looks like:

<!DOCTYPE pathway SYSTEM "http://www.genome.ad.jp/kegg/xml/KGML_v0.4_.dtd";>

It can't parse and gives me an error:

Message: An exception occurred! Type:MalformedURLException, Message:The URL used an unsupported protocol

I've searched the past mailing-list messages, the only suggestion I've seen is changing to a newer version, but it seems that I am using 2_5_0, should be pretty new. and other things may cause the problem?? Thank a lot!

Did you build the Xerces library or did you use a binary distribution? It could be that you are using a Xerces library that was built without the NetAccessor module.


Alberto


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to