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

  • Home
  • SEARCH
  • 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 8354193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:28:48+00:00 2026-06-09T09:28:48+00:00

I use XSLT to convert this: 1) <fruit> <apple count=2/> <banana count=3/> </fruit> into

  • 0

I use XSLT to convert this:

1)

<fruit>
  <apple count="2"/>
  <banana count="3"/>
</fruit>

into this:

2)

Apple: 2
Banana: 3

Is there a library that serves as a parser for text data which allows descriptive declaration of the expected tokens (think both Extended Backus–Naur Form |EBNF| and Lex/Yacc regex-based hints) and builds an XML DOM from it?

  • 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-06-09T09:28:51+00:00Added an answer on June 9, 2026 at 9:28 am

    Is there a library that serves as a parser for text data which allows descriptive declaration of the expected tokens (think both Extended Backus–Naur Form |EBNF| and Lex/Yacc regex-based hints) and builds an XML DOM from it?

    Yes. FXSL 2.0 has a function f:lr-parse() which does exactly that. This is written in pure XSLT 2.0 and implements a general (table-driven) LR-1 parser, that accepts as input an XML file containing the parse tables and a text file containing the “sentence” to be parsed.

    I have used this function for a number of parsers, ranging from a toy arithmetic expressions to medium-sized — JSON, to very large — XPath 2.0 — languages.

    See for example this article in my blog: Transforming JSON

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

Sidebar

Related Questions

I'm trying to use XSLT text output to generate a file (in a file
What XSLT processor should I use for Java transformation? There are SAXON, Xalan and
I want to create conditional comments in XSLT. But when I use this: <!--
Is it possible to use XSLT to transform XML into something other than XML?
This is my first time using XSLT. I'm trying to create a file that
I am trying to convert plain text files to XML files using XSLT. I
I am trying to use XSLT to transform a XML in to flat text.
I'm starting to use XSLT, and I don't understand this line: <xsl:apply-templates select=file:file/file:description />
I would like to use xslt to transform an xml file into an almost
I tried to use a XSLT transformation (below) to a RSS with this type

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.