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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:24:33+00:00 2026-05-13T19:24:33+00:00

We have pretty big (~200mb) xml files from different sources that we want to

  • 0

We have pretty big (~200mb) xml files from different sources that we want to transform into a common format.

For structural transformations (element names, nesting, etc) we decided to use XSLT (1.0). Because it has to be fast (we receive a lot of those files), we chose Apache Xalan as the engine. Structural transformations might be quite complex (not just <tag a> -> <tag b>), and are different for xml files from different sources.

However, we also need to transform values of the elements. Transformations can be rather complex (i.e., some require access to Google Maps API, others require access to our database, etc…), so we decided to use a simple Ruby-based DSL, which is a list of “xpath selector” => transformer entities, i.e.:

{"rss/channel/item" => {:class => 'ItemMutators', :method => :guess_location}

However, keeping elements transformations apart from value transformations seems rather like a hack. Are there any better solutions?


For example, with Java you can write extensions for xalan, and you can use them to transform the values.
Is there something similar but for ruby?


Thank you, guys!
All the responses were very valuable. I am currently thinking 🙂

  • 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-13T19:24:34+00:00Added an answer on May 13, 2026 at 7:24 pm

    You should be able to use XSLT extensions. A web search reveals that Xalan supports Java for doing extensions: http://xml.apache.org/xalan-j/extensions.html

    Quote from the linked page:

    For those situations where you would
    like to augment the functionality of
    XSLT with calls to a procedural
    language, Xalan-Java supports the
    creation and use of extension elements
    and extension functions. Xalan-Java
    also provides a growing extensions
    library available for your use.

    Also, apparently someone has written a package in Ruby which can provide xslt extensions: http://greg.rubyfr.net/pub/packages/ruby-xslt/classes/XML/XSLT.html

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

Sidebar

Related Questions

I have pretty big background of .net, and I've decided that i want to
I have a pretty complicated Linq query that I can't seem to get into
I have pretty big table with lots of columns. I want to find all
I have a pretty big webapp that's being built in MVC. I'm also abstracting
I have a log file that can get pretty big. The information in my
I have just managed to migrate a pretty big database from SQL Server to
I have a program that is getting pretty big and it is a pain
I have a pretty big query, that is generated in in a script, to
I have a pretty big query to pull out the information about reports from
I've noticed that I take a pretty big performance hit when I have an

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.