470,849 Members | 1,273 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

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

.... 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....

Jan 10 '06 #1
0 1160

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Colin McGuigan | last post: by
3 posts views Thread by Dean Slindee | last post: by
2 posts views Thread by Sebastian Araya | last post: by
reply views Thread by paulroskilly | last post: by
2 posts views Thread by JˇGius≥ vs ::NRG::ius | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.