Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 904087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:59:34+00:00 2026-05-15T15:59:34+00:00

Looks like libxslt does not support XSLT 2.0, and xsl:result-document . Is there a

  • 0

Looks like libxslt does not support XSLT 2.0, and xsl:result-document. Is there a way to mimic xsl:result-document using libxslt, or xsltproc?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T15:59:35+00:00Added an answer on May 15, 2026 at 3:59 pm

    Yes, there is, using exsl:document. A simple example:

    ==== foo.xsl ====
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
                    xmlns:exsl="http://exslt.org/common"
                    extension-element-prefixes="exsl">
      <xsl:output method="html"/>
      <xsl:template match="/">
        <exsl:document href="toc.html" method="html">
          <html>
            <body>
              <xsl:apply-templates select=".//h1"/>
            </body>
          </html>
        </exsl:document>
        <xsl:apply-templates/>
      </xsl:template>
      <xsl:template match="node()|@*">
        <xsl:copy>
          <xsl:apply-templates select="node()|@*"/>
        </xsl:copy>
      </xsl:template>
    </xsl:stylesheet>
    

    taking this as input:

    ==== foo.html ====
    <html>
      <body>
        <h1>Hello, world!</h1>
        <p>Some longwinded text follows.</p>
      </body>
    </html>
    

    when run like this:

    xsltproc foo.xsl foo.html
    

    will yield this to stdout:

    <html>
      <body>
        <h1>Hello, world!</h1>
        <p>Some longwinded text follows.</p>
      </body>
    </html>
    

    while also writing this to toc.html:

    <html><body><h1>Hello, world!</h1></body></html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Update : Looks like the query does not throw any timeout. The connection is
Looks like my shared hosting plan does not cover running a Jabber server. Does
Looks like set does not work in velocity when written as below : #set
Looks like the following Ellipse in ControlTemplate does not get the BorderThickness, but why?
Looks like apple has deprecated an api my app is using. Not sure how
looks like symfony2 classloader does not allow different paths for namespaces, anyone has any
Looks like here in StackOveflow there is a group of F# enthusiasts. I'd like
Looks like there is no Load event for usercontrol on the CF. I'm used
Looks like XSD.exe is not delivered as a part of Visual Studio 2010. what
Looks like dynamic memory allocation without garbage collection is a way to disaster. Dangling

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.