Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for including arbitrary elements to templates #3

Open
dnewcome opened this issue Sep 20, 2011 · 0 comments
Open

Add support for including arbitrary elements to templates #3

dnewcome opened this issue Sep 20, 2011 · 0 comments

Comments

@dnewcome
Copy link
Owner

We'd like to be able to add some calculated values to the output that don't come from the input XML. For example, recently I used Jath to parse data for use in a Windows Metro application. The application UI is based around items and groups, and when I process my items, I want to assign them to a group, which is a reference to a group object.

Here is an example:

var parsed = Jath.parse( [ '//notes', {
id: 'Note_ID',
title: 'Title',
...
group: pageData.groups[0]
} ], xmldoc );

Jath currently supports using an escape character to insert string literals, but It won't work in the case of something that isn't a string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant