ANNOUNCE: Perl tut # 21 - How to use XML::XQL - xmlSplitter.pl 
Author Message
 ANNOUNCE: Perl tut # 21 - How to use XML::XQL - xmlSplitter.pl

Oops. In case it isn't obvious, hit

    http://www.*-*-*.com/

for the program itself.

--
Cheers
Ron & Pen Savage

http://www.*-*-*.com/



Sat, 07 Dec 2002 03:00:00 GMT  
 ANNOUNCE: Perl tut # 21 - How to use XML::XQL - xmlSplitter.pl
This tutorial is an example of how to use XML::XQL to split 1 XML document
into several.

Specifically, given this document:

<wrapper>
  <doc1>Contents of Document One</doc1>
  <doc2><b>Contents of Document Two</b></doc2>
  <doc3><c><chapter>Contents of 3.1</chapter><chapter>Contents of
3.2</chapter>Contents of Document Three</c></doc3>
</wrapper>

xmlSplitter.pl outputs these 3 lines:

doc1 => Contents of Document One

doc2 => <b>Contents of Document Two</b>

doc3 => <c><chapter>Contents of 3.1</chapter><chapter>Contents of
3.2</chapter>Contents of Document Three</c>

Note: Date::Manip, Parse::Yapp and XML::DOM are prerequisites for XML::XQL.

Also, here are 2 warnings, copied from the source of xmlSplitter.pl:

# Warning 1:
# This program - xmlSplitter.pl - was developed under MS Windows NT.
# I downloaded XML-XQL-0.61.tar.gz from CPAN. Attempting to install
# it produced many error messages. This is because the author has used
# a Unix command, tput, at lines 522, 523, 525 and 526 in XQL.pm.
# You can either ignore these errors, or patch the code before installation.
# Patching requires you to convert all (4) lines which look like:
#  $x = `tput x` || "z"; or $x = (`tput x` . `tput y`) || "z"
# into
#  $x = "z";
#
# Warning 2:
# Near the end of this program is a call to xql_xmlString.
# I determined that this was needed by examining the example
# program samples/xql.pl, which is in XML-XQL-0.61.tar.gz.
# In samples/xql.pl, you'll find a sub transform, which calls xql_xmlString
# under certain circumstances. By experimention, I have ascertained that
# calling solve (see below) on _my_ data returns objects of a certain type,
# and that that type provides the method xql_xmlString. Thus xql_xmlString
can
# be safely called (apparently) on the output from solve, without needing
all
# of sub transform in this program. YMMV.

--
Cheers
Ron & Pen Savage

http://savage.net.au/index.html



Sat, 07 Dec 2002 03:00:00 GMT  
 ANNOUNCE: Perl tut # 21 - How to use XML::XQL - xmlSplitter.pl

Ron> This tutorial is an example of how to use XML::XQL to split 1 XML document
Ron> into several.

If I'm not mistaken, XML::XQL has been abandoned in favor of the much
more standard XPath, implemented in the CPAN as XML::XPath.

Perhaps you could do a tutorial on something other than dead-end
technologies. :)

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095

Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



Sat, 07 Dec 2002 03:00:00 GMT  
 ANNOUNCE: Perl tut # 21 - How to use XML::XQL - xmlSplitter.pl


:
: Ron> This tutorial is an example of how to use XML::XQL to split 1 XML document
: Ron> into several.
:
: If I'm not mistaken, XML::XQL has been abandoned in favor of the much
: more standard XPath, implemented in the CPAN as XML::XPath.
:
: Perhaps you could do a tutorial on something other than dead-end
: technologies. :)

I don't recall hearing Enno say he was dropping XML::XQL, although it's
plain that Matt's putting in a lot more development effort on XML::XPath.

As for XQL itself, there are several implementations on various
platforms, so I'd say it's still viable, at least until the W3C Query WG
issues a WD, which probably won't happen until the religious war over
relative URI references as namespace names gets resolved.



Sat, 07 Dec 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. ANNOUNCE: Perl tut # 22 - Using XML::XPath - xpathSplitter[12].pl

2. Can Template::Toolkit and XML::XQL be used on Windows NT

3. ANNOUNCE: Tut # 35: An admin tool for MySQL: myadmin.pl

4. ANNOUNCE: Net::LDAPapi v1.21 Available

5. ANNOUNCE: tagged-0.21 released

6. ANNOUNCE: Parse-Yapp-0.21, Christmas Release

7. XML::XQL

8. ANN: Perl tut # 5: XML::DOM etc

9. XML::XQL

10. ANN: Perl tut # 18: doctype2xsl.pl

11. ANNOUNCE: Tutorial # 32: Showcasing Image::Magick (part 2): xml-2-image.pl

12. ANNOUNCE: Perl tut # 17 - MS Word doc to text, para by para

 

 
Powered by phpBB® Forum Software