XML, Python, XML-SIG, documentation, PyXml, 4
Peter Hansen
peter at engcorp.com
Sat May 4 23:09:21 EDT 2002
[Reposting to possibly-still-relevant threads since my outbound news has
been swallowing all my posts for a week!]
andrew cooke wrote:
>
> Peter Hansen <peter at engcorp.com> wrote in message news:<3CC62D76.2E0D3A54 at engcorp.com>...
> > andrew cooke wrote:
> > >
> > > (I've already looked at XSLT and I don't believe that is the right
> > > tool for this kind of job).
> >
> > Why do you say that? What you describe above is pretty much
> > what XSLT is for...
>
> My understanding (which may be completely wrong - in which case I'd
> like to know!) is that XSLT is for generating new representations from
> the old data, but that the new representation is separate from the old
> structure. In other words, it's easy to generate a completely new
> form based on the original information, but difficult to keep the old
> data largely intact with just small modifications.
I don't think I understand the distinctions you are making. Certainly
the output is separate from the old structure, since it's a new
tree. You cannot modify the previous tree in-place. XSLT is
declarative: it describes how the new tree should look, and builds
it from pieces of the old.
But there's absolutely no reason you can't generate a new tree
that looks very like the old one but with just small modifications.
> If that's wrong, please could someone point me to an example (and
> apologies for being obtuse, but the examples I've seen are of that
> form and, in one case, stressed what I thought was the point I'm
> making above).
Once I understand the point you are making I might be able to.
Effectively any book about XSLT should examples which show what
I'm talking about, so if they don't look suitable to you I must
be missing something still.
-Peter
More information about the Python-list
mailing list