Virtual Xml DOMDocument

This is a discussion on Virtual Xml DOMDocument within the PHP Language forums, part of the PHP Programming Forums category; I would like to create a class that acts like an Xml document so that I can pass it through ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-10-2006
ksampson@cox.net
 
Posts: n/a
Default Virtual Xml DOMDocument

I would like to create a class that acts like an Xml document so that I
can pass it through an XSLT transform. But, there is never any
Document created.

Basically, what I'm trying to do, is a virtual XML layer over a
persistence framework that allows you to access a database with XPath
queries. I've already done something like this in another project and
language, but, it's too custom to pass into an XSLT transform.
Also, the database huge. I only want to read the portions in...
requested by all the XPATH stuff in the XSLT file.

So, I basically want to do something like.....

class DBDOMDoc extends DOMDocument {
var $PersistenceObject; // This object is the head of the
hierarchy...

.... override reading of the nodes, with Persistence Framework
requests (db queries )
}

$xml = new DBDOMDoc;
$xml->PersistenceObject = $someDBObj;

// Configure the transformer
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl); // attach the xsl rules

if ( $argc == 4 && $argv[3]=='dom' ){

echo $proc->transformToDoc($xml)->firstChild->wholeText;
} else {
echo $proc->transformToXml($xml);
}

Any help is appreciated....

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 12:02 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0