XInclude and XLink: how to get working?

Discussion in 'XML' started by jmichae3, Nov 13, 2013.

  1. jmichae3

    jmichae3 Guest

    I have a .xml XML data structure and a .xsl XSLT stylesheet.
    I made another .xml file that xincludes these two.

    <?xml version="1.0" encoding="UTF-8"?>
    <!--include:crossReference xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:include="http://www.w3.org/XML/1998/namespace">
    <locator xlink:type="extended" xlink:href="menu7.xml" xlink:role="XML" xlink:title="web site structure"/>
    <locator xlink:type="extended" xlink:href="menu7.xsl" xlink:role="XSL" xlink:title="reformat XML as HTML5"/>
    </include:crossReference-->

    <document xmlns:xi="http://www.w3.org/2001/XInclude">
    <xi:include href="1.xml" parse="xml" role="structure">
    <xi:fallback>ERROR: menu7.xml (structure) could not be loaded.</xi:fallback>
    </xi:include>
    <xi:include href="1.xsl" parse="xml" role="reformat XML as HTML5">
    <xi:fallback>ERROR: menu7.xsl (style sheet) could not be loaded.</xi:fallback>
    </xi:include>
    </document>

    but it doesn't work in opera or ff. the XSLT is supposed to render as HTML5 using
    <xsl:eek:utput
    method="html"
    doctype-system="about:legacy-compat"
    encoding="UTF-8"
    indent="yes" />
    for the doctype.
     
    jmichae3, Nov 13, 2013
    #1
    1. Advertisements

  2. I am not aware of browsers supporting XInclude.
     
    Martin Honnen, Nov 13, 2013
    #2
    1. Advertisements

  3. I'd suggest you use XSLT to produce the effect of XInclude, but with
    Chrome threatening to remove their XSLT support that may not be portable
    either. You may have to do this on the server side.
     
    Joe Kesselman, Nov 15, 2013
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.