You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Cameron McBride <ca...@cwru.edu> on 2002/04/16 10:30:59 UTC

Embperl and XML

It seems to me (from document fragments and example code) that the 'XML
integration' has mostly targetted the XSLT transformations.

What if I just want to parse some XML files? 

 - are the libxml2 documented functions just bootstrapped into the embperl
   namespace? (haven't tested this at all, so the next question would be
   how they are accessed, which I might be able to determine on my own)
   
 - Should I just use an outside complete-perl solution, which is simply
   'use'd from within my Embperl code?

 - Other ideas? 

Suggestions?

Cameron

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Embperl and XML

Posted by Gerald Richter - ecos gmbh <ri...@ecos.de>.
>
> Ahh!  Is there a way I can access this cacheing part of the XML?

At the moment you can only access it if you do some C programming, but I
plan to expose it to an Perl API in one of the next versions.

I have put alot of time in the rearragement from b5 to b6 and now I have to
first do some other things to earn some money, so I can't exactly say when
this will be...

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------





---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Embperl and XML

Posted by Cameron McBride <ca...@cwru.edu>.
> Yes, that's what Embperl currently does. Additionaly it caches parsed XSLT
> stylesheets and XML documents (you can configure that), so when you make a
> lot of transformations using the same stylesheet on different doucments, the
> sytlesheet only get's parsed once (Embperl automaticly reparses it when it
> changes on disk)

Ahh!  Is there a way I can access this cacheing part of the XML?  The
same xml doc will provide data for several pages, and having it cached 
would be kind of nice...

Naturally, such a solution would also require that it be reparsed when
there is an on-disk change.  

Is there a way for me to access this part of Embperl?  What would be the
best approach for this?

Cameron


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Embperl and XML

Posted by Gerald Richter <ri...@ecos.de>.
>
> Ahh, perhaps I am starting to get it.  Basically the XSLT recipes
> configure the processing of the code to use XML libraries, and when you
> do an Execute on them, they make the calls using the specified XML
> library (libxml2 in my case).  So all the XSLT functionality is done
> by the respective libraries, and Embperl makes the necessary calls to
> these by wrapping these in perl code to conform to the Embperl API.
>
> So all Embperl really knows is the correct way to call the few necessary
> functions from the XML library to parse and get the XSLT done. Nice
>
> That close?
>

Yes, that's what Embperl currently does. Additionaly it caches parsed XSLT
stylesheets and XML documents (you can configure that), so when you make a
lot of transformations using the same stylesheet on different doucments, the
sytlesheet only get's parsed once (Embperl automaticly reparses it when it
changes on disk)

Gerald



-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Embperl and XML

Posted by Cameron McBride <ca...@cwru.edu>.
> > It seems to me (from document fragments and example code) that the 'XML
> > integration' has mostly targetted the XSLT transformations.
> >
> 
> It's maily intended for transforming it and generating output. For now this
> means mainly XSLT.

Ahh, perhaps I am starting to get it.  Basically the XSLT recipes
configure the processing of the code to use XML libraries, and when you 
do an Execute on them, they make the calls using the specified XML 
library (libxml2 in my case).  So all the XSLT functionality is done 
by the respective libraries, and Embperl makes the necessary calls to 
these by wrapping these in perl code to conform to the Embperl API. 

So all Embperl really knows is the correct way to call the few necessary
functions from the XML library to parse and get the XSLT done. Nice

That close?

> >  - Should I just use an outside complete-perl solution, which is simply
> >    'use'd from within my Embperl code?
> 
> Yes, just use XML::LibXML or anything similar

Great!  Just wanted to make sure I was not reproducing functionality
that already existed.  

Cameron

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Embperl and XML

Posted by Gerald Richter <ri...@ecos.de>.

> It seems to me (from document fragments and example code) that the 'XML
> integration' has mostly targetted the XSLT transformations.
>

It's maily intended for transforming it and generating output. For now this
means mainly XSLT.

> What if I just want to parse some XML files?
>
>  - are the libxml2 documented functions just bootstrapped into the embperl
>    namespace? (haven't tested this at all, so the next question would be
>    how they are accessed, which I might be able to determine on my own)
>

No, the Perl part of libxml is not used by Embperl at all

>  - Should I just use an outside complete-perl solution, which is simply
>    'use'd from within my Embperl code?

Yes, just use XML::LibXML or anything similar

Gerald



-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


RE: Embperl and XML

Posted by Wim Kerkhoff <wi...@nyetwork.org>.
On 16-Apr-2002 Cameron McBride wrote:
> It seems to me (from document fragments and example code) that the 'XML
> integration' has mostly targetted the XSLT transformations.
> 
> What if I just want to parse some XML files? 
> 
>  - are the libxml2 documented functions just bootstrapped into the embperl
>    namespace? (haven't tested this at all, so the next question would be
>    how they are accessed, which I might be able to determine on my own)
>    
>  - Should I just use an outside complete-perl solution, which is simply
>    'use'd from within my Embperl code?
> 
>  - Other ideas? 
> 
> Suggestions?

That's a really good question... I've read through a couple of the
articles/tutorials at xml.com, but I'm still not clear on how it all fits
together. So if you find anything of interest, keep us in the loop :-)

Wim Kerkhoff
wim@nyetwork.org

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org