You are here: Virtual Xml DOMDocument « PHP Programming Language « IT news, forums, messages
Virtual Xml DOMDocument

Posted by ksampson on 01/10/06 23:27

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация