[XML-SIG] Re: [4suite] Disentangling StylesheetReader from Ft.Lib

Mike Olson Mike.Olson@fourthought.com
Mon, 21 May 2001 17:57:53 -0600

Karl Anderson wrote:
> Mike Olson <Mike.Olson@fourthought.com> writes:
> > "Martin v. Loewis" wrote:
> > >
> > > I've tried to update my 4XSLT port to use the 4Suite 0.11 code base,
> > > only to discover that the StyleseetReader class is now much stronger
> > > connected to Ft.Lib than before, in particular to classes from
> > > pDomletteReader, and their specific instance attributes.
> >
> > I was just in there as well and quite suprised how complex the code has
> > become.  I thought of doing some work on it but figured, it ain't
> > broke.....
> > Is pDomlette the only import from Ft.Lib?  If so, why not move pDomlette
> > into xml.utils?  Better yet, let's merge pDomlette and minidom so there
> > is only one domlette.  pDomlette has greatly out grown its original
> > purpose so I have not problems with moving it into XML-Sig.
> If you're suggesting that the DOMs should be consolidated so that
> tools like PyXML's XSLT could support only that DOM, I hope you'll
> reconsider.  I'd like Zope's DOM to be usable by PyXML's XSLT and
> XPath implementations.

Not at all.  I was suggesting that both miniDOM and pDomlette are light
weight python DOM implementations and I don't think we need two of
them.  If Zope's DOM supports the Python DOM interface, then it should
work in xslt/xpath.  If not it is a bug in xslt/xpath.

However, I don't know if this will always be the case.  4XSLT is about
to get a _big_ rewrite and we might not support a "runNode" interface
anymore.  If we do, it will probably not be the most efficent way to use
4xslt as we will have to translate from DOM into the internal data

> There are some hurdles to this, though.  The tests are only usable
> with 4Suite, which makes it harder to find inconsistencies.
> Submitting patches to 4Suite's implementations wouldn't be helpful for
> my goals, because 4Suite's XSLT and XPath processors have become more
> reliant on its particular DOM since these modules were forked to
> PyXML.

Actually, the tests would be easy to fix to use another DOM, (though I'm
not sure how you would do it in Zope as I ran into many hurdles
executing ZDOM outside of the Zope environment).  Hoever, to do this,
edit the file test_harness.py.  It is used by every 4XSLT test script. 
Either add a test for ParsedXML, or replace all of the existing tests
with a parsedXML test.  Then just run test.py and all of the 4XSLT tests
will use Parsed XML.

I don't understand the more reliant part.  How have we become more
reliant.  Are you talking about the fact that MArtin did a lot of work
when he first moved 4XSLT into PyXML to disentangle 4XSLT from Ft.Lib? 
Then its not really more reliant, just not ported yet.

FYI to all, we will be synching 4XSLT with Martins changes in the near

> --
> Karl Anderson                          karl@digicool.com

Mike Olson				 Principal Consultant
mike.olson@fourthought.com               (303)583-9900 x 102
Fourthought, Inc.                         http://Fourthought.com 
Software-engineering, knowledge-management, XML, CORBA, Linux, Python