XInclude and XLink: how to get working?

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

  1. 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.
    , Nov 13, 2013
    #1
    1. Advertising

  2. wrote:
    > 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.


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

  3. On 11/13/2013 5:33 AM, Martin Honnen wrote:
    > I am not aware of browsers supporting XInclude.


    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. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shay
    Replies:
    0
    Views:
    849
  2. DV
    Replies:
    1
    Views:
    2,769
    Martin Honnen
    Apr 19, 2004
  3. Bernd Oninger
    Replies:
    1
    Views:
    516
    Henry S. Thompson
    Jun 30, 2004
  4. SL
    Replies:
    0
    Views:
    516
  5. Martin

    xlink and xpointer

    Martin, Feb 9, 2007, in forum: XML
    Replies:
    4
    Views:
    470
    Martin
    Feb 10, 2007
Loading...

Share This Page