Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #20344

Re: XSLT to Python script conversion?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed20.multikabel.net!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; '(currently': 0.07; 'python': 0.08; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:script': 0.09; 'thoughts?': 0.09; 'discourages': 0.16; 'from:addr:behnel.de': 0.16; 'from:addr:stefan_ml': 0.16; 'from:name:stefan behnel': 0.16; 'received:mnet-online.de': 0.16; 'switching': 0.16; 'this?': 0.19; 'seems': 0.20; 'appropriate': 0.22; 'header:In-Reply-To:1': 0.22; 'stefan': 0.24; 'script': 0.28; 'alternatives': 0.29; 'easier.': 0.30; 'porting': 0.30; 'least': 0.30; 'xml': 0.31; 'subject:?': 0.31; 'does': 0.32; 'header:User-Agent:1': 0.33; 'it?': 0.33; 'header:X-Complaints-To:1': 0.34; 'problem.': 0.35; 'to:addr :python-list': 0.35; 'received:org': 0.36; 'using': 0.37; 'another': 0.37; 'could': 0.38; 'getting': 0.38; 'url:org': 0.39; 'processing': 0.39; 'received:de': 0.39; 'to:addr:python.org': 0.40; 'more': 0.61; 'your': 0.61; 'share': 0.66; 'received:93': 0.79; 'xslt': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Stefan Behnel <stefan_ml@behnel.de>
Subject Re: XSLT to Python script conversion?
Date Mon, 13 Feb 2012 14:34:08 +0100
References <jharfo$1rij$1@ns.felk.cvut.cz>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host ppp-93-104-18-155.dynamic.mnet-online.de
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120129 Thunderbird/10.0
In-Reply-To <jharfo$1rij$1@ns.felk.cvut.cz>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.5759.1329140063.27778.python-list@python.org> (permalink)
Lines 22
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1329140063 news.xs4all.nl 6891 [2001:888:2000:d::a6]:57471
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:20344

Show key headers only | View raw


Matej Cepl, 13.02.2012 12:20:
> I am getting more and more discouraged from using XSLT for a transformation
> from one XML scheme to another one.

Could you explain what it is that discourages you about it? That would
allow us to come up with better alternatives for your specific problem.


> Does anybody could share any experience
> with porting moderately complicated XSLT stylesheet
> (https://gitorious.org/sword/czekms-csp_bible/blobs/master/CEP2OSIS.xsl)
> into a Python script using ElementTree's interparse or perhaps xml.sax?
> 
> Any tools for this? Speed differences (currently I am using xsltproc)? Any
> thoughts?

You could try switching to lxml. It would at least allow you to do a part
of the processing in Python and only use XSLT when it seems more
appropriate and/or easier.

Stefan

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

XSLT to Python script conversion? Matej Cepl <mcepl@redhat.com> - 2012-02-13 12:20 +0100
  Re: XSLT to Python script conversion? Stefan Behnel <stefan_ml@behnel.de> - 2012-02-13 14:34 +0100
  Re: XSLT to Python script conversion? "Mike C. Fletcher" <mcfletch@vrplumber.com> - 2012-02-13 11:28 -0500
  Re: XSLT to Python script conversion? Tim Arnold <Tim.Arnold@sas.com> - 2012-02-15 12:48 -0500
    Re: XSLT to Python script conversion? Matej Cepl <mcepl@redhat.com> - 2012-02-16 18:17 +0100
      Re: XSLT to Python script conversion? Ross Ridge <rridge@csclub.uwaterloo.ca> - 2012-02-17 15:37 -0500
        Re: XSLT to Python script conversion? Stefan Behnel <stefan_ml@behnel.de> - 2012-02-17 21:53 +0100
          Re: XSLT to Python script conversion? Ross Ridge <rridge@csclub.uwaterloo.ca> - 2012-02-17 16:11 -0500

csiph-web