Alta_
asked on
Transforming many xml files via XSLT processor in PHP
Is it posible to process many xml files (to act like one)
via
$html = xslt_process$xsltproc, 'XMLfile.xml', 'XSLfile.xsl'); ?
I need this because the XML files are related and I need to extract data from all of them in the same time...with a single XSL file. (like a SQL join).
I tried to use in XSL file:
<xsl:apply-templates
select="document('relatedF ile.xml')/ RELATED_TA G">
</xsl:apply-templates>
but its not working.
I wonder if it is a way to make a global xml with a root node and append all the xml files as children of the root node...and then ...in the xsl file...to use
<xsl:apply-templates
select="root/RELATED_TAG">
</xsl:apply-templates>
via
$html = xslt_process$xsltproc, 'XMLfile.xml', 'XSLfile.xsl'); ?
I need this because the XML files are related and I need to extract data from all of them in the same time...with a single XSL file. (like a SQL join).
I tried to use in XSL file:
<xsl:apply-templates
select="document('relatedF
</xsl:apply-templates>
but its not working.
I wonder if it is a way to make a global xml with a root node and append all the xml files as children of the root node...and then ...in the xsl file...to use
<xsl:apply-templates
select="root/RELATED_TAG">
</xsl:apply-templates>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You are on the right track!!
Your code is missing an /
Your Code
<xsl:apply-templates
select="document('relatedF
Try
<xsl:apply-templates
select="document('relatedF
*******************
I created a master XSL file which accepts a parameter for a default XML page. This page is usually the default elements eg logo, header etc.
This is the parameter to accept the page.
<xsl:param name="DefaultPage" />
This is how I call it.
<xsl:apply-templates select="document($DefaultP