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

What is the advantage of this compared to Open-Xml-PowerTools? #23

Open
rklec opened this issue Oct 7, 2021 · 3 comments
Open

What is the advantage of this compared to Open-Xml-PowerTools? #23

rklec opened this issue Oct 7, 2021 · 3 comments

Comments

@rklec
Copy link

rklec commented Oct 7, 2021

As far as I see this here supports a special syntax for template parsing and has some features to add and remove text/document content parts.

Now
They also support a special syntax, see the example they provide here:
grafik

From the first look, their syntax (supporting loops etc.) even looks more elaborate. They just seem to use XML for inputting data, while you use JSON or a dictionary.

So what is the advantage of your library here?

Maybe you want to document that in a Readme.

@rklec rklec changed the title What is the advantage of this comparing it to Open-Xml-PowerTools? What is the advantage of this compared to Open-Xml-PowerTools? Oct 7, 2021
@dgwaldo
Copy link
Contributor

dgwaldo commented Nov 30, 2021

:) Maybe Open-Xml-PowerTools should document how to use it for templating in their ReadMe. We decided to use this project over power tools. For the most part we've been very happy with that choice. Templating format matters for your sanity. <# <Content Select="" ... looks like its straight out of web forms. This library provides a better templating syntax. We don't use XML data, so we'd have to convert our JSON to XML. This library provides a pluggable architecture to take data from whatever format you need to adapt from. And it supports the common ones out of the box. Templating can get complex, our templates are. This library is a higher level abstraction, easier to use that OpenXML Power Tools.

@antonmihaylov
Copy link
Owner

antonmihaylov commented Nov 30, 2021

What @dgwaldo wrote was pretty much the intended purpose that made me start this project.

There are other solutions, like Open-Xml-PowerTools, yes. But if I hand a similar-looking document over to a non-technical person they will most likely get scared of it and will require technical assistance for any type of changes on it. So the developer will be responsible for changing the templates.

While a template for OpenXmlTemplates looks at least a bit better, all the variables are inside content controls, not within some specific markup tags. And arguably the syntax is easier to learn (<# <Conditional Select=x Match=y/> ... </EndConditional/> vs conditionalRemove_X_eq_Y>

Can you elaborate on

their syntax (supporting loops etc.) even looks more elaborate.

I might be missing something, but I don't see anything not supported in OpenXmlTemplates in that screenshot. Repeating sections are supported

@rklec
Copy link
Author

rklec commented Dec 1, 2021

Okay thanks for explaining all that.

I might be missing something, but I don't see anything not supported in OpenXmlTemplates in that screenshot. Repeating sections are supported

Yeah, I don't know, I just had a quick look and of course it's even better when your library can do the same. 🙂

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

3 participants