You are viewing a plain text version of this content. The canonical link for it is here.
Posted to p-dev@xerces.apache.org by "Harmon S. Nine" <hn...@netarx.com> on 2001/03/09 05:16:28 UTC

Good news! SWIG 1.3 and xerces-perl are playing nice together

Hello all.

In a marathon session, I was able to work out all the kinks in xerces-perl
to get it to work with XWIG 1.3.  Everything compiles.  All the tests work.

I'll be shipping it to Jason and everyone on the list sometime between 
tomorrow and
Monday.

Cheers.

-- Harmon


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


Re: Good news! SWIG 1.3 and xerces-perl are playing nice together

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Harmon S. Nine" <hn...@netarx.com> writes:

> In a marathon session, I was able to work out all the kinks in xerces-perl
> to get it to work with XWIG 1.3.  Everything compiles.  All the tests work.
> 
> I'll be shipping it to Jason and everyone on the list sometime between 
> tomorrow and
> Monday.

Alright! that is good news!

Were you using the code I checked in to CVS, or did you recreate it on
your own? Just curious. I'm eager to see how you fixed the other
tests. 

jas.

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


The RTTI module

Posted by Fredrick Paul Eisele <ph...@netarx.com>.
The RTTI module is our first cut at exposing a C++ capability into the Perl 
environment.
RTTI, run time type information, implements serveral type/class functions.

dynamic_cast: can cast from a polymorphic base class to a derived or 
sibling class.  This is implemented as a restricted bless.  I should not be 
allowed to bless into a class for which certain methods will not be supported.

typeid: returns the class to which an object belongs, i.e. the ref function.

actual_cast: bless an object into the most specific class to which it belongs.
The relevance in Xerces is to provide a means for selectively blessing a
DOM::Node into, for example, the DOM::Element class, according to its 
saved type.  It happens that a DOM::Node carries its specific class, the 
object is blessed into this class, upon calling actual_cast.

schema_cast: (in development) when an XML serialization is parsed it 
would be nice if the resulting DOM were blessed into a class.
This could be implemented by reading a URN (namespace?), loading the
appropriate module and blessing the DOM into the package.
i.e. <xyz xmlns="urn:xerces:foo/bar"> would use XML::Xerces::foo::bar;

It is likely that introducing a module to perform these behaviors was ill
conceived and should be rethought.  I frequently use the actual_cast method,
which could easily be added to the Xerces.pm without the need for any RTTI.pm.

-- 
Fredrick Paul Eisele
30910 Telegraph Rd.
Bingham Farms, MI
1.248.647.9800

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


Re: Good news! SWIG 1.3 and xerces-perl are playing nice together

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Jason E. Stewart" <ja...@openinformatics.com> writes:

> I would like to make the SWIG 1.3 line the official release for
> Xerces.pm-1.3. Because we supply a pre-SWIG'ed Xerces.pm and Xerces.C
> people do not need SWIG to build the module, Xerces.i is only there
> for developers.

It also seems that SWIG 1.3 behaves better in the debugger, I haven't
had any trouble yet, and I've run quite a few scripts and pieces of
test code through the debugger with Xerces.pm...

jas.

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


Re: Good news! SWIG 1.3 and xerces-perl are playing nice together

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Harmon S. Nine" <hn...@netarx.com> writes:

> The RTTI.pm module should really be kept seperate from the
> XML::Xerces namespace.  Right now, it performs a function similar to
> "reinterpret_cast<TYPE>" in C++.  Theoretically, it could be applied
> to any package (in particular, those generated by SWIG).

I have only some minor qualms:
* I have no real idea what RTTI.pm actually does or why we need it (I
  would like to know)
* If it is SWIG specific, that should likely be part of the title,
  i.e. SWIG::RTTI
* Creating toplevel namespace modules should be really general, and it
  seems that what we have is currently very specific to our needs
* and since the rest of the module get's installed under XML::Xerces,
  I don't want to go stomping on somebody else's installation of a
  toplevel RTTI.pm module whent they think they are installing a bunch
  of stuff that only lives in the XML::Xerces namespace.

> The code-munging exercise is complete for SWIG 1.1.  That is,
> postSource.pl and postModule.pl have been modified to place the
> xerces-perl package into the XML::Xerces namespace even though the
> "-package" option in SWIG 1.1 is broken.  I'll send you the changes
> ASAP (the only reason I did this was to see if it could be done, and
> because SWIG 1.3 is still alpha).

OK. Thanks. I hope you enjoyed the excercise ;-)

My suggestion:
* I merge in your SWIG 1.1 changes into the branch and we cut another
  release. 
* Then I merge in the SWIG 1.3 line into the main line and cut
  another release. 
* update the WWW site
* Then we work on Xerces 1.4

I would like to make the SWIG 1.3 line the official release for
Xerces.pm-1.3. Because we supply a pre-SWIG'ed Xerces.pm and Xerces.C
people do not need SWIG to build the module, Xerces.i is only there
for developers.

> So, if we're in agreement, I'd like to scrap FileInputSource and
> MemoryInputSource.  Also, scrapping FileInputSource would render the
> Xerces.C.diff file unnecessary.  That would eliminate a headache.

Ah... I like the sound of that ... the sound of the backspace key
deleting unnecessary code ;-)

jas.

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


Re: Good news! SWIG 1.3 and xerces-perl are playing nice together

Posted by "Harmon S. Nine" <hn...@netarx.com>.
Jason:
The RTTI.pm module should really be kept seperate from the XML::Xerces 
namespace.
Right now, it performs a function similar to "reinterpret_cast<TYPE>" in 
C++.
Theoretically, it could be applied to any package (in particular, those 
generated by SWIG).

The code-munging exercise is complete for SWIG 1.1.  That is, 
postSource.pl and
postModule.pl have been modified to place the xerces-perl package into the
XML::Xerces namespace even though the "-package" option in SWIG 1.1 is 
broken.
I'll send you the changes ASAP (the only reason I did this was to see if 
it could be
done, and because SWIG 1.3 is still alpha).

A few more things:
Since the InputSources that come with Xerces are all working under 
xerces-perl,
we can drop the non-standard ones I built early-on in the project.  
These are
FileInputSource and MemoryInputSource.

The standard InputSource's that come with Xerces, i.e. LocalFileInputSource,
StdInInputSource, and MemBufInputSource provide essentially the same 
functionality.
The only thing FileInputSource allows over and above these is the 
ability to take an
XML document through an arbitrary file-descriptor, which is unlikely 
ever to be needed.
If it does, we could create a "DescriptorInputSource."

So, if we're in agreement, I'd like to scrap FileInputSource and 
MemoryInputSource.
Also, scrapping FileInputSource would render the Xerces.C.diff file 
unnecessary.
That would eliminate a headache.

-- Harmon

Jason E. Stewart wrote:

> "Harmon S. Nine" <hn...@netarx.com> writes:
> 
> 
>> In a marathon session, I was able to work out all the kinks in xerces-perl
>> to get it to work with XWIG 1.3.  Everything compiles.  All the tests work.
>> 
>> I'll be shipping it to Jason and everyone on the list sometime between 
>> tomorrow and
>> Monday.
> 
> Harmon sent me his patches, and I have now checked them in to the
> Rel-1_3-SWIG-1_3 branch for testing. 
> 
> The big news:
> * namespace is now XML::Xerces
> * RTTI.pm moved to XML::Xerces::RTTI to be consistent
> * SWIG 1.3 is required
> * It all works!!! (thanks Harmon)
> 
> I've started munging the test scripts a bit, to make them more
> consistent with other modules, I'll continue with this. Right now you
> get the ugly "unitialized value in global destructor" warning, but
> I'll fix that, it's just a warning...
> 
> TODO:
> * Merge the SWIG 1.3 into the main branch
> * Cut a new release
> * update the WWW pages
> * Announce this to the World!!!!
> * Celebrate!!!!!!!!
> 
> Cheers,
> jas.
> 
> PS. Harmon would you update from CVS to get this version and make sure
> everything is still kosher for your installation?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
> 
> 




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


Re: Good news! SWIG 1.3 and xerces-perl are playing nice together

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Harmon S. Nine" <hn...@netarx.com> writes:

> In a marathon session, I was able to work out all the kinks in xerces-perl
> to get it to work with XWIG 1.3.  Everything compiles.  All the tests work.
> 
> I'll be shipping it to Jason and everyone on the list sometime between 
> tomorrow and
> Monday.

Harmon sent me his patches, and I have now checked them in to the
Rel-1_3-SWIG-1_3 branch for testing. 

The big news:
* namespace is now XML::Xerces
* RTTI.pm moved to XML::Xerces::RTTI to be consistent
* SWIG 1.3 is required
* It all works!!! (thanks Harmon)

I've started munging the test scripts a bit, to make them more
consistent with other modules, I'll continue with this. Right now you
get the ugly "unitialized value in global destructor" warning, but
I'll fix that, it's just a warning...

TODO:
* Merge the SWIG 1.3 into the main branch
* Cut a new release
* update the WWW pages
* Announce this to the World!!!!
* Celebrate!!!!!!!!

Cheers,
jas.

PS. Harmon would you update from CVS to get this version and make sure
everything is still kosher for your installation?

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