Jump to content

porton

Members
  • Content count

    6
  • Joined

  • Last visited

Everything posted by porton

  1. I want to extend XHTML with tags like <pre syntax:format="python"> # Some Python code def f(): pass </pre> The text in <pre> tag should be "enriched" with <span> HTML tags with classes, to highlight the syntax of the text inside <pre>. What my code should do if the processed <pre> tag already contains some XML tags? Example: <pre syntax:format="python"> # Some Python code def f(): <em>pass</em> </pre> The variants I thought of: first remove the tags (like <em> in the above example) leave the content of the <pre> tag as is (just remove syntax:format argument) terminate my pipeline processing with an error
  2. porton

    XML in plaintext, what to do with it?

    @justsomeguy You confuse between pre-formatted and plain text. <pre> in HTML can contain any formatting tags (<em>, <strong>, etc.) I decide to raise an exception in this case, because other ways do not work for me.
  3. porton

    Namespace for macroses

    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)?
  4. porton

    Namespace for macroses

    @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.
  5. porton

    Namespace for macroses

    @Ingolme Also: I do not need that my XML would be understandable by a browser.
  6. porton

    Namespace for macroses

    @Ingolme I know XSLT and know it well. I ask for code embedded into a regular XML file not about XSLT.
×