One more ques Re: [XML-SIG] I am confused...

Uche Ogbuji uche.ogbuji@fourthought.com
Mon, 29 Jan 2001 14:07:10 -0700


> On Sun, 28 Jan 2001, Mike Olson wrote:
> 
> And one more problem: my texts are far from plain ASCII.
> Do I need to convert them to utf8 or unicode before
> working with XML+XSLT+XPath?
> Do I need Python-2 to implement non US-ASCII site (and not latin-1)?

If you're using anything besides US-ASCII, I *stringly* suggest Python 2.0.

> >> In my application I need many such queries to fill
> >> the template - that is why speed was unbearable.
> >
> >What is you template?  XSLT?  If not have you thought of using it.  It
> >sounds like it was designed to do exactly what you need.

Pretty much.

> >Again, it sounds like your doing a lot by hand that is not needed.  You
> >can do this in XSLT with a simple template like
> 
> ><xsl:template match='article'>
> >  <HTML><HEAD><TITLE>Article By <xsl:value-of
> >select='author/name'/></TITLE></HEAD></HTML>
> ></xsl:template>
> 
> Wow! If it works as advertized - this is what I need.
> 
> Can I also embed some python sentences there to handle
> hard cases?

The easiest way to do this is through what's known as extension functions and 
extension elements.  But you might be surprised at how much you can do without 
straying from XSLT.

I would look in these places for inspiration

http://www.ibiblio.org/xml/books/bible/updates/14.html
http://www.zvon.org/xxl/XSLTutorial/Books/Book1/index.html
http://www.jenitennison.com/xslt/index.html
http://www.dpawson.co.uk/xsl/xslfaq.html
http://www.w3schools.com/xsl/

> Demos are sometimes more valuable than tutorials.
> In fact, I feel a need to reread overviews on XML (XSLT, XPath, AFs etc)
> to have better idea what they do before looking at
> demos.

There's some of this in the demo directory of the 4Suite documentation, but 
also see the above links for examples all of which should work with 4XSLT.


-- 
Uche Ogbuji                               Principal Consultant
uche.ogbuji@fourthought.com               +1 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python