ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
Re: XML::SAX::Machines - calling widget methods
by Matt Sergeant other posts by this author
Feb 14 2002 4:15PM messages near this date
view in the new Beta List Site
XML::SAX::Machines - calling widget methods | Re: XML::SAX::Machines - calling widget methods
On Thu, 14 Feb 2002, Aaron Straup Cope wrote:

>  Hi,
> 
>  I am trying to decide if I want to tackle writing an "as PDF" stylesheet
>  and SAX filter using PDFLib. That is, the stylesheet would generate a new
>  XML file where the contents of the source would be wrapped in elements
>  that a final filter could interpret to call PDFLib methods.
> 
>  Setting aside all the issues involved in that part of the puzzle, I am
>  unclear on how I would call the XML::Filter::XSLT->set_stylesheet_uri
>  method in the pipeline.
> 
>  If I can call the constructor in the pipeline, is there any reason why I
>  couldn't do this :
> 
>   my $machine = Pipeline(
>        "XML::Filter::XSLT->new()->set_stylesheet_uri('my_pdflib.xsl')"

Well set_stylesheet_uri doesn't return the object (at the moment), plus
you'd need to remove your outer quotes...

However I suggest for XSLT (and perhaps anything that takes a stylesheet),
to define it outside of the Machine:

  my $xslt = XML::Filter::XSLT-> new();

  my $machine = Pipeline(
	$xslt =>  XML::Filter::PDF => \*STDOUT
  );

  $xslt-> set_stylesheet_uri('my_pdflib.xsl');

  $machine-> parse_uri('foo.xml');

Then you're free to reuse the machine, and also to change your XSLT at any
time.

-- 
Matt.
<:-> get a SMart net</:->


________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Aaron Straup Cope
Matt Sergeant
Barrie Slaymaker

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved