Warning:
This wiki has been archived and is now read-only.

XML Macros

From Argumentation Community Group
Jump to: navigation, search

XML Macro Definitions as XML Schema and XSLT

XSLT Transforms in XML Schema Application Information Annotation

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:annotation>
    <xs:appinfo xmlns:{1}="{2}" {1}:{3}="application/xslt+xml" {1}:{4}="{1}:macro" {1}:{5}="{6}">
      <transform xmlns="http://www.w3.org/1999/XSL/Transform">
        <output media-type="{6}" />
        ...
      </transform>
    </xs:appinfo>
  </xs:annotation>
  ...
</xs:schema>

Define Element Example

<define name="namespace:element">
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:annotation>
      <xs:appinfo xmlns:{1}="{2}" {1}:{3}="application/xslt+xml" {1}:{4}="{1}:macro" {1}:{5}="{6}">
        <transform xmlns="http://www.w3.org/1999/XSL/Transform">
          <output media-type="{6}" />
          ...
        </transform>
      </xs:appinfo>
    </xs:annotation>
    ...
  </xs:schema>
</define>
<define name="namespace:element" href="filename.ext" />

XML Schema and XSLT Transforms

Define Element Example

<define name="namespace:element">
  <schema xmlns="http://www.w3.org/2001/XMLSchema">
    ...
  </schema>
  <transform xmlns="http://www.w3.org/1999/XSL/Transform">
    ...
  </transform>
</define>
<define name="namespace:element" schema="filename.xsd" transform="filename.xslt" />

Open Topics

In addition to formulating and specifying the format, open topics include:

  1. The name of the format to be specified, the title of the specification document, tentatively "XML Macro Definitions"