I have this XML file:
<?xml version="1.0"?>
<xi:include href="http://www.w3schools.com/dom/books.xml"
xmlns:xi="http://www.w3.org/2003/XInclude"/>
and I expected that it should result in referenced remote XML file http://www.w3schools.com/dom/books.xml
at the time of processing.
For that purpose I created this XSL file:
<?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>
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 XInclude
instruction wasn't performed.
So how can I apply XSLT on Xincluded XML file, if possible?