Jump to content

Namespace for macroses


porton

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)?

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...