OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Procedural vs Declarative XML transformation approaches

[ Lists Home | Date Index | Thread Index ]
  • From: Sean McGrath <sean@digitome.com>
  • To: xml-dev@lists.xml.org
  • Date: Fri, 10 Nov 2000 17:15:37 +0000

At 08:12 PM 11/4/00 +0000, Matt Sergeant wrote:

 >By procedural I
 >mean something that says:
 >
 >foreach foo element
 >         output "foo: "
 >         foreach bar element child of foo
 >                 output " = "
 >                 foreach text child of bar
 >                         output the text
 >
 >Mapping that model to mixed content is, umm, difficult, to say the least.

Using the Pyxie Python library the code would look like this:

for f in T.Elements("foo"):
          T.Seek(f)
          print "\nfoo = "
          for b in T.Children("bar"):
                  T.Seek("bar")
                  print T.JoinData()


What is difficult about that? (Or have I misunderstood you?)

Sean
Sean McGrath
CTO
Propylon - Enabling Universal Mobility
http://www.propylon.com
Tel: +353 1 6620482





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS