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 7055681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:46:40+00:00 2026-05-28T03:46:40+00:00

managed to get my xsl working at http://www.xmlper.com/ (great tool good recommendation from other

  • 0

managed to get my xsl working at http://www.xmlper.com/ (great tool good recommendation from other stackoverflow comment).

but when I run the same (and now highly stripped down) xml & xsl on my mac os x command line I get “compilation error, Document is not a stylesheet”

Is it a version issue (output of xsltproc below)? i’m running latest mac (10.7) and latest xcode 4.2 (to ensure xml lib etc)?
i couldn’t find anything about xsltproc not supporting xslt v2.0 (I’ve tried setting to v1.0 – no difference)
I did try and download other xslt processors (e.g. saxon) but got into old java versions and couldn’t get the program to run.

hope someone has come across this and has solved it!
thanks

Ben

Input xml file

<?xml version="1.0" encoding="utf-8"?>
<resultsfile>
  <planset>
    <voicemail_divert>
      <cost_over_plan>0</cost_over_plan>
      <this_txn_absolutely_cost_subtotal>0</this_txn_absolutely_cost_subtotal>
    </voicemail_divert>
  </planset>
</resultsfile>

xsl

<?xml version="1.0"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml"/>
<xsl:template match="@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
  </xsl:copy>
</xsl:template>
  <xsl:template match="cost_over_plan">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
  </xsl:copy>
    <extracost_overplan_aspartoftotal>0</extracost_overplan_aspartoftotal>
    <extraqty_overplan_aspartoftotal>0</extraqty_overplan_aspartoftotal>
</xsl:template>
</xsl:stylesheet>

error

$ xsltproc --debug --novalid --nonet f.xml add_extraqtyandcostfields.xsl 
compilation error: file f.xml line 2 element resultsfile
 xsltParseStylesheetProcess : document is not a stylesheet

version info

$ xsltproc -version
Using libxml 20703, libxslt 10124 and libexslt 813
xsltproc was compiled against libxml 20703, libxslt 10124 and libexslt 813
libxslt 10124 was compiled against libxml 20703
libexslt 813 was compiled against libxml 20703
  • 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-28T03:46:41+00:00Added an answer on May 28, 2026 at 3:46 am

    As documented in the manpage, the stylesheet must preceed the XML file in xsltproc’s arguments:

    $ xsltproc --debug --novalid --nonet add_extraqtyandcostfields.xsl f.xml
    

    should work.

    Also, your xsltproc doesn’t seem to support XSLT 2.0. Luckily, your stylesheet doesn’t seem to require new XSLT 2.0 features. You can simply replace <xsl:stylesheet version="2.0" with <xsl:stylesheet version="1.0" to fix the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I managed to get it working on Win32 (inheriting from wx.MiniFrame does the trick),
I managed to get the selected file in the current working folder from Windows
I managed to get some help from a previous question and I have the
I managed to get the YUI calendar widget working fine. But When it displays
I managed to get authentication to work by following the tutorial from this page
I eventually managed to get my other post sorted; to create a way to
Has anyone managed to get subsonic or a variant working on Windows Mobile? We
I managed to get Ajax working in Rails, specifically using remote_form_for tag to add
I've managed to get the back end working for an android app, where it
So I've managed to get Code First running and it works great. Since I

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.