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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:12:51+00:00 2026-05-13T23:12:51+00:00

I’m seeing this exception message coming from XslCompiledTransform.Transform(), but after handling the exception the

  • 0

I’m seeing this exception message coming from XslCompiledTransform.Transform(), but after handling the exception the XSL transform still appears to have been successful. The full exception message is:

Token Text in state EndRootElement
would result in an invalid XML
document. Make sure that the
ConformanceLevel setting is set to
ConformanceLevel.Fragment or
ConformanceLevel.Auto if you want to
write an XML fragment.

The stylesheet looks like this:

<xsl:stylesheet version="1.0" xmlns:ext="ext:extensions" xmlns:f="http://schemas.foo.com/FOAMSchema">
  <xsl:template match="/Root/Documents/PO/DROPSHIP">
    <Transactions>
      <Transaction>
        <f:partnerTransmission>
          <transmission_id>
            <xsl:value-of select="ext:NewGUID()"/>
          </transmission_id>
          <partner_code>
            <xsl:value-of select="/Root/@PartnerCode"/>
          </partner_code>
          <control_nbr>
            <xsl:value-of select="@GS_CNTRL_NUM"/>
          </control_nbr>
          <creationTime>
            <xsl:value-of select="ext:ConvertToStandardDateTime(@DATE,@TIME,'ISO8601Basic')"/>
          </creationTime>
          <direction>I</direction>
          <messageCount>
            <xsl:value-of select="count(ORDERS/ORDER)"/>
          </messageCount>
          <syntax>XML</syntax>
          <format>BARBAZ</format>
          <deliveryMethod>FTP</deliveryMethod>
        </f:partnerTransmission>
      </Transaction>
    </Transactions>
  </xsl:template>
</xsl:stylesheet>

The generated XML looks like this:

<Transactions xmlns="http://schemas.foo.com/IntegrationProfile" xmlns:ext="ext:extensions">
  <Transaction>
    <f:partnerTransmission xmlns:f="http://schemas.foo.com/FOAMSchema">
      <transmission_id>a5e0ec76-6c24-426b-9eb5-aef9c45d913f</transmission_id>
      <partner_code>VN000033</partner_code>
      <control_nbr>650</control_nbr>
      <creationTime>9/27/2008 12:51:00 AM</creationTime>
      <direction>I</direction>
      <messageCount>2</messageCount>
      <syntax>XML</syntax>
      <format>BARBAZ</format>
      <deliveryMethod>FTP</deliveryMethod>
    </f:partnerTransmission>
  </Transaction>
</Transactions>

The above is what I get when I catch and ignore the exception.

I haven’t been able to find a way to set the ConformanceLevel (the property is read-only), but at the same time I also don’t think there should be a problem here anyway.

Does my output constitute an XML fragment? Am I missing something in the stylesheet?

  • 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-13T23:12:51+00:00Added an answer on May 13, 2026 at 11:12 pm

    The exception is trying to tell you that you have attempted to output text after the close element of the root element. The reason your output looks ok is that the exception prevented the invalid XML from being generated.

    The reason is simple: you don’t have a transform for the root of the document. Therefore, the default transformations are performed. These will output the text content of all elements as text nodes.

    Add

    <xsl:template match="/">
        <xsl:apply-templates select="/Root/Documents/PO/DROPSHIP"/>
    </xsl:template>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 371k
  • Answers 371k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It should be placed in any of the page, request,… May 14, 2026 at 7:07 pm
  • Editorial Team
    Editorial Team added an answer Sorry to disappoint you but handling such a simple case… May 14, 2026 at 7:07 pm
  • Editorial Team
    Editorial Team added an answer It seems it's not a GWT-specific bug - please see… May 14, 2026 at 7:07 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.