From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/47526 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: question for the xml-experts Date: Thu, 19 Feb 2009 15:10:43 +0100 Message-ID: References: <4C416126-1F10-4206-BD3F-9377AC7C81CC@uni-bonn.de> <0EFC87B1-9EF1-4DF6-A9B7-0A34A7BCCD6F@uni-bonn.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1235052803 17271 80.91.229.12 (19 Feb 2009 14:13:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Feb 2009 14:13:23 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Feb 19 15:14:38 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1La9f1-0001ma-Ci for gctc-ntg-context-518@m.gmane.org; Thu, 19 Feb 2009 15:13:55 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B7BA71FB8C; Thu, 19 Feb 2009 15:12:30 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12445-03-2; Thu, 19 Feb 2009 15:11:24 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EEA211FB77; Thu, 19 Feb 2009 15:11:23 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9E4601FB74 for ; Thu, 19 Feb 2009 15:11:22 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12445-03 for ; Thu, 19 Feb 2009 15:10:44 +0100 (CET) Original-Received: from filter2-nij.mf.surf.net (filter2-nij.mf.surf.net [195.169.124.153]) by ronja.ntg.nl (Postfix) with ESMTP id AE6C11FB77 for ; Thu, 19 Feb 2009 15:10:44 +0100 (CET) Original-Received: from mail-bw0-f165.google.com (mail-bw0-f165.google.com [209.85.218.165]) by filter2-nij.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n1JEAhBc024424 for ; Thu, 19 Feb 2009 15:10:44 +0100 Original-Received: by bwz9 with SMTP id 9so1188032bwz.2 for ; Thu, 19 Feb 2009 06:10:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=tLYLNq+dkBavx4Si63Rf9X3cFA+XVcXPePV0h/ZDbks=; b=vwEKTRnRRH0bJS9niamEjLSM1DLzpRXA/PbP2wuYKuqc4ALMEZy5/bdU4sp02lV/Cu 26PJIo/iTsBSknvLt4EiFX+udAjW2iipTy9NRDrN/F+ziMB5BHrB8L+IDBr4Kh2YLNNY ca0AWwqy+q6RmaWR2pTdK4oDfcmQDCwkkYClc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=j3aCOveiToPNn0ia/IgwWVVD9B+awtiH3qwUPiJaP2raFxFrDBYVuIX0UWun2GgyY5 Og6qe3VBOvPOwJ6RmZvtimH2Doo5DcNMUoZjLMt/A6yYrIZbHA16FZZet0fjqraJC36A ffCS+3XawZTBy5WJB4A59AivTIWFR6PvZhq0M= Original-Received: by 10.181.61.18 with SMTP id o18mr3222468bkk.66.1235052643422; Thu, 19 Feb 2009 06:10:43 -0800 (PST) In-Reply-To: <0EFC87B1-9EF1-4DF6-A9B7-0A34A7BCCD6F@uni-bonn.de> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.218.165; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 182392239 - efd5e21f2c77 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:47526 Archived-At: On Thu, Feb 19, 2009 at 12:53 PM, Thomas A. Schmitz wrote: > > On Feb 19, 2009, at 11:39 AM, luigi scarso wrote: > >>>>> >>>>> >>>>> FOO = etree.Element("FOO") >>>>> emph = etree.Element("emph") >>>>> [child.tag for child in foo.iterdescendants(tag = >>>>> '{urn:oasis:names:tc:opendocument:xmlns:text:1.0}span' ) ] >> >> ['{urn:oasis:names:tc:opendocument:xmlns:text:1.0}span'] >>>>> >>>>> span = [child for child in foo.iterdescendants(tag = >>>>> '{urn:oasis:names:tc:opendocument:xmlns:text:1.0}span' ) ][0] >>>>> emph.text = span.text >>>>> FOO.append(emph) >>>>> etree.tostring(FOO) >> >> 'foo' >>>>> >> > > Excuse me for being dense: you mean all namespaces have to be explicitly > expanded? see http://codespeak.net/lxml/tutorial.html#namespaces -- luigi ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________