[oXygen-user] Nested xincludes

Stefan Vasile
Thu Mar 25 09:36:20 CDT 2010


Hello,

I tried to reproduce your problem so I created a file with the following 
content:

<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:xi="http://www.w3.org/2001/XInclude">
    <xi:include href="file:///home/projects/cms/story/screen_default.xml">
        <xi:fallback>
            <xi:include href="personal.xml">
                <xi:fallback>
                    <parseGridError
                        
url="file:///home/projects/cms/story/screen_default.xml" />
                </xi:fallback>
            </xi:include>
        </xi:fallback>
    </xi:include>
</root>

and I saved it in the Oxygen samples directory in order to reference the 
already existing personal.xml file (as xinclude fallback).
Then I created a small XSL file to test the transformation and the 
debugging process.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs"
    xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl" version="1.0">
    <xsl:template match="/">
        <html>
            <body>
                <table>
                    <xsl:for-each select="//person">
                        <tr>
                          <td><xsl:value-of select="name"/></td>
                          <td><xsl:value-of select="email"/></td>
                        </tr>
                    </xsl:for-each>
                </table>
                <br />
            </body>
        </html>
    </xsl:template>
</xsl:stylesheet>

Indeed, there is a warning message that the xinclude operation failed 
and the fallback will be used but the debugging process seems to 
continue correctly.
Please let me know if I missed something (I tested with Oxygen 11.2 and 
Saxon HE/PE/EE and Saxon 6.5.5 as XSLT processors).

Best regards,
Stefan Vasile
http://www.oxygenxml.com

PS: Please make sure that Options->Preferences->XML->XML Parser->"Enable 
XInclude processing" is checked (that should be the default).
> Hi,
>
> I'm having trouble using the oXygen debugger with a sequence of nested
> xincludes.  When the first xinclude fails (which is expected in this
> instance), the error message says "include operation failed, reverting
> to fallback" but it doesn't seem to actually progress any further.
>
> <xi:include href="file:///home/projects/cms/story/screen_default.xml">
> 	<xi:fallback>
> 		<xi:include href="http://localhost/cms/story/screen_default.xml">
> 			<xi:fallback>
> 				<parseGridError
> url="file:///home/projects/cms/story/screen_default.xml" />
> 			</xi:fallback>
> 		</xi:include>
> 	</xi:fallback>
> </xi:include>
>
> The second xinclude instruction works perfectly when it's not nested
> within the first xinclude.
>
> Does anyone know what the problem might be and how to fix it?
>
> S.
> _______________________________________________
> oXygen-user mailing list
> 
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>   




More information about the oXygen-user mailing list