JiBX
  1. JiBX
  2. JIBX-256

Code Gen Documentation not clear on element level customization

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: JiBX 1.2
    • Fix Version/s: JiBX 1.2.2
    • Component/s: core
    • Labels:
      None
    • Number of attachments :
      0

      Description

      codegen-customs.html shows:

      <element path="element[@name=OTA_AirAvailRS]/**/element[@name=OriginDestinationOption]" generation="skip"/>

      This seemed inconsistent with the remainder of the page, which does not mention an "element" element (all I could see was "The element name for the customization always matches the name of the schema definition element being customized (but without namespace).").

      Also there is no mention of a "generation" attribute in the docs. There is an "ignore" attribute which controls generation.

        Activity

        Hide
        Nigel Charman added a comment -

        OK, I understand it more now I've looked at the examples, and actually written one from scratch. What would really explain it well would be an XML Schema for the schema customization xml.

        The documentation would be clearer if the "Schema component customizations" section were expanded to say something like:

        "Specific schema components may be customized by creating an element named with the type of schema component, which must be one of

        • element
        • complexType
        • attribute
        • (list any other types that are supported)

        The path and name attributes, along with the nesting of the schema component customizations, are used to match the specific schema component. Namespaces are ignored.

        All schema component customizations can use any of the nesting customization attributes defined in the last section, and also the following attributes:
        ...."

        Also I think the start of "Nesting customizations" could be simplified to read:

        "Nesting customization attributes can be used on any customization element, including 'schema-set', 'schema' and schema component customizations. Here's the alphabetical list of these attributes:"

        The example in "Customization document structure" should have ignore="true" rather than generation="skip".

        Show
        Nigel Charman added a comment - OK, I understand it more now I've looked at the examples, and actually written one from scratch. What would really explain it well would be an XML Schema for the schema customization xml. The documentation would be clearer if the "Schema component customizations" section were expanded to say something like: "Specific schema components may be customized by creating an element named with the type of schema component, which must be one of element complexType attribute (list any other types that are supported) The path and name attributes, along with the nesting of the schema component customizations, are used to match the specific schema component. Namespaces are ignored. All schema component customizations can use any of the nesting customization attributes defined in the last section, and also the following attributes: ...." Also I think the start of "Nesting customizations" could be simplified to read: "Nesting customization attributes can be used on any customization element, including 'schema-set', 'schema' and schema component customizations. Here's the alphabetical list of these attributes:" The example in "Customization document structure" should have ignore="true" rather than generation="skip".
        Hide
        Dennis Sosnoski added a comment -

        I've cleaned up the documentation a bit. I'll try to add a simple schema for the customizations before the 1.2.2 release.

        Show
        Dennis Sosnoski added a comment - I've cleaned up the documentation a bit. I'll try to add a simple schema for the customizations before the 1.2.2 release.
        Hide
        Dennis Sosnoski added a comment -

        Added docs/schemas/codegen-customizations.xsd (generated with SchemaGen, after fixing several problems, then extended by hand and tested with various customization documents).

        Show
        Dennis Sosnoski added a comment - Added docs/schemas/codegen-customizations.xsd (generated with SchemaGen, after fixing several problems, then extended by hand and tested with various customization documents).

          People

          • Assignee:
            Dennis Sosnoski
            Reporter:
            Nigel Charman
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: