Jump to content
porton

Namespace for macroses

Recommended Posts

Is there an XML namespace for creating "macroses" (they receive arguments and create XML code from an XML template)?

 

Also, what about conditionals (if-then-else) and probably loops (as in functional programming languages)?

Share this post


Link to post
Share on other sites

The closest thing you'll find is XSLT, but it will only work if passed through an XSLT parser. Most browsers have one built in, but if you're in a different environment it will have to load some tool or library to do it.

XML does not do anything on its own, it always has to be interpreted by a program.

Share this post


Link to post
Share on other sites

XML does not have macros, it does not have conditionals or loops. It is hardly different than a plain text file. It does nothing until a program reads it.

Share this post


Link to post
Share on other sites

@Ingolme I know that XML does not have macros.

But it is quite possible to create an XML namespace which could act like a macro language for XML.

I started this topic because I need to decide whether to create a new namespace (and its semantics) for this purpose, or whether there is already designed such a thing, so that I would not need to create new namespaces but use existing ones.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...