Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Xinclude supported in Saxon?

saxon-help
mayur_naik
2006-10-29
2012-10-08
  • mayur_naik
    mayur_naik
    2006-10-29

    Hello,

    I'm using the following command:

    java net.sf.saxon.Transform -o foo.html foo.xml foo.xsl

    where foo.xml is of the form:

    <?xml version="1.0"?>
    <!DOCTYPE foo SYSTEM "foo.dtd">
    <foo xmlns:xi="http://www.w3.org/2001/XInclude">
    <xi:include href="bar.xml"/>
    ...
    </foo>

    However, it seems like Saxon does not understand the xi:include command, and so I'm unable to refer in foo.xsl to xml elements in bar.xml from the root of foo.xml. I'm new to XInclude though I've been using Saxon for a while. Can someone tell me how I can get this to work?

    Thanks,
    -- Mayur

     
    • Michael Kay
      Michael Kay
      2006-11-30

      First, sorry for not responding earlier. I don't get notified of messages on this forum. The forum seems to have recently reappeared with changes to the Sourceforge GUI, and I hadn't noticed it.

      Saxon has no built-in XInclude support. However, it's possible to get an XInclude processor that works as a SAX filter which you can insert between the XML parser and Saxon. Details depend on how you are running the transformation.

      Michael Kay