How to apply XSLT on XML with just XInclude

captkirk685

New Member
I have this XML file:\[code\]<?xml version="1.0"?><xi:include href="http://www.w3schools.com/dom/books.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>\[/code\]and I expected that it should result in referenced remote XML file \[code\]http://www.w3schools.com/dom/books.xml\[/code\] at the time of processing. For that purpose I created this XSL file:\[code\]<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions"> <xsl:output method="xml"/> <xsl:template match="*"> <xsl:copy-of select="//book/title"/> </xsl:template></xsl:stylesheet>\[/code\]which after XSL transform, I expected to get XML output with title nodes from referenced XML file.However it didn't happen, transformation just produced an empty file. I suspect that \[code\]XInclude\[/code\] instruction wasn't performed.So how can I apply XSLT on Xincluded XML file, if possible?
 
Back
Top