[xslt] Splitting a result into subtrees

I have a PHP/XSLT web application. It currently emits whole HTML pages.
In order to plug it into the Drupal CMS, I need to get hold of about
five subtrees of this HTML and then pass those on to Drupal as strings.

What is the best way to achieve this?

Newer versions of Saxon allow the user to pass an "initial mode" or
"initial template" as a parameter to the transformation. I don't think
this is possible with LibXSLT, but maybe it helps to illustrate what I'd
like to achieve.

I'm currently thinking one way to achieve what I want is to create
new DOMDocument objects to receive subtrees using a recursive call to
importNode(), and then to serialize those new documents.

Can you think of a better way?

Michael Ludwig

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]