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

Mike Olson Mike.Olson@fourthought.com
Mon, 29 Jan 2001 11:43:07 -0700


Roman Suzi wrote:
> 
> 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)?

It would certainly make life easier, but you should be able to use 1.5.2

> 
> My templates are just fiels with %(var)s -style things inside.
> And thank you mentioning XSLT with referring to
> working site - I will see if this fit in my case.

It sounds like it will.  I think it will help performance as well.  You
can precompile your stylesheets so there is almost no overhead for
loading them.

> 
> >> Please, tell me if I did it wrong:
> >>
> >> - parsed xml-file
> >> - quered each variable in a template-file from the xml-file
> >> - filled template with values found to produce web-page
> >>   (some variables go to other pages, for example, content page)
> >
> >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?

What kind of hard cases?  XSLT is a lot more powerful then what I
showed, there are for loops, variables, if statements.  If you do reach
the extent of what XSLT can do, then you can write extension functions
and extension elements in Python.


Cheers,

Mike

-- 
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