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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:14:45+00:00 2026-05-11T17:14:45+00:00

I want to allow users to upload files with transaction information to my application.

  • 0

I want to allow users to upload files with transaction information to my application. I want users to be able to user their own file format when doing so (XML or CSV).

So I’m going to need a transformation from their format to my format before doing further processing. I don’t want to have to create this XSLT manually every time a user has a new file format, so I want to create a UI to essentially build this XSLT document.

This is relatively easy for a CSV file format. The user says the first element maps to x field on my side, second element maps to 7 field etc.

This gets more complicated when the file format is XML with nested elements etc. Does anyone know of a good UI paradigm for doing so? Any examples I can look at on the web or elsewhere? I imagine the user would have to describe a full xpath as part of the mapping, or maybe first upload an XSD and use that to select elements for the mapping (after which I’d need to generate the XSLT).

I appreciate any ideas.

  • 1 1 Answer
  • 1 View
  • 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-11T17:14:45+00:00Added an answer on May 11, 2026 at 5:14 pm

    If the input XML can be mapped to your XML format in a straight-forward way, then a set of XPath expressions would be required from the user.

    By “straight-forward way” I mean a very basic <xsl:apply-templates> approach. The input XML must have individual records that can be addressed unambiguously, containing all the data in the right format. No data would require calculating or other special processing any more complex than what can be achieved by the evaluation of a single XPath expression.

    If the input is:

    <root>
      <entry id="1" name"foo">
        <data1>somevalue
          <data2>othervalue</data2>
        </data1>
      </entry>
    </root>
    

    and your desired output would be:

    <records>
      <record>
        <id>1</id>
        <name>foo</name>
        <data1>somevalue</data1>
        <data2>othervalue</data2>
      </record>
    </records>
    

    then the user would have to provide the following mappings:

    • root element: “root”
    • record element: “entry”
    • id: “@id”
    • name: “@name”
    • data1: “data1”
    • data2: “data1/data2”

    and the XSLT would be something like this (the values in “%” are to be replaced by the actual XPath expressions from the above mapping configuration):

    <xsl:template match="/">
      <records>
        <xsl:apply-templates select="%root element%/%record element%" />
      </records>
    </xsl:template>
    
    <xsl:template match="%root element%/%record element%">
      <record>
        <id>
          <xsl:value-of select="%id-xpath%[1]" />
        </id>
        <name>
          <xsl:value-of select="%name-xpath%[1]" />
        </name>
        <!-- and so on -->
      </record>
    </xsl:template>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to allow users to make their own Python mods for my game,
I have an application where I allow my users to upload a file of
My yet to be released Delphi 2010 application allows users to upload their files
I want to allow my users to upload .php files to the server, but
I want to allow registered users of a website ( PHP ) to upload
I want to create a Web app which would allow the user to upload
I want to allow users of my application to add sub-users and set privileges
I am making an application in Java and I want to allow users to
I'm building a simple web based forum application. I want to allow users to
I develop a web application that let users to upload files like images and

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.