module Asciidoctor module NIST class Converter < Standoc::Converter SERIES = { "nist-ams": "NIST Advanced Manufacturing Series", "building-science": "NIST Building Science Series", "nist-fips": "NIST Federal Information Processing Standards", "nist-gcr": "NIST Grant/Contract Reports", "nist-hb": "NIST Handbook", "itl-bulletin": "ITL Bulletin", "jpcrd": "Journal of Physical and Chemical Reference Data", "nist-jres": "NIST Journal of Research", "letter-circular": "NIST Letter Circular", "nist-monograph": "NIST Monograph", "nist-ncstar": "NIST National Construction Safety Team Act Reports", "nist-nsrds": "NIST National Standard Reference Data Series", "nistir": "NIST Interagency/Internal Report", "product-standards": "NIST Product Standards", "nist-sp": "NIST Special Publication", "nist-tn": "NIST Technical Note", "other": "NIST Other", "csrc-white-paper": "CSRC White Paper", "csrc-book": "CSRC Book", "csrc-use-case": "CSRC Use Case", "csrc-building-block": "CSRC Building Block", }.freeze SERIES_ABBR = { "nist-ams": "NIST AMS", "building-science": "NIST Building Science Series", "nist-fips": "NIST FIPS", "nist-gcr": "NISTGCR", "nist-hb": "NIST HB", "itl-bulletin": "ITL Bulletin", "jpcrd": "JPCRD", "nist-jres": "NIST JRES", "letter-circular": "NIST Letter Circular", "nist-monograph": "NIST MN", "nist-ncstar": "NIST NCSTAR", "nist-nsrds": "NIST NSRDS", "nistir": "NISTIR", "product-standards": "NIST Product Standards", "nist-sp": "NIST SP", "nist-tn": "NIST TN", "other": "NIST Other", "csrc-white-paper": "CSRC White Paper", "csrc-book": "CSRC Book", "csrc-use-case": "CSRC Use Case", "csrc-building-block": "CSRC Building Block", }.freeze CALL_FOR_PATENT_CLAIMS = <<~END.freeze Call for Patent Claims

This public review includes a call for information on essential patent claims (claims whose use would be required for compliance with the guidance or requirements in this Information Technology Laboratory (ITL) draft publication). Such guidance and/or requirements may be directly stated in this ITL Publication or by reference to another publication. This call also includes disclosure, where known, of the existence of pending U.S. or foreign patent applications relating to this ITL draft publication and of any relevant unexpired U.S. or foreign patents.

ITL may require from the patent holder, or a party authorized to make assurances on its behalf, in written or electronic form, either:

  1. assurance in the form of a general disclaimer to the effect that such party does not hold and does not currently intend holding any essential patent claim(s); or

  2. assurance that a license to such essential patent claim(s) will be made available to applicants desiring to utilize the license for the purpose of complying with the guidance or requirements in this ITL draft publication either:

    1. under reasonable terms and conditions that are demonstrably free of any unfair discrimination; or

    2. without compensation and under reasonable terms and conditions that are demonstrably free of any unfair discrimination.

Such assurance shall indicate that the patent holder (or third party authorized to make assurances on its behalf) will include in any documents transferring ownership of patents subject to the assurance, provisions sufficient to ensure that the commitments in the assurance are binding on the transferee, and that the transferee will similarly include appropriate provisions in the event of future transfers with the goal of binding each successor-in-interest.

The assurance shall also indicate that it is intended to be binding on successors-in-interest regardless of whether such provisions are included in the relevant transfer documents.

Such statements should be addressed to: ITL-POINT-OF_CONTACT.

END PATENT_DISCLOSURE_NOTICE1 = <<~END.freeze Patent Disclosure Notice

NOTICE: The Information Technology Laboratory (ITL) has requested that holders of patent claims whose use may be required for compliance with the guidance or requirements of this publication disclose such patent claims to ITL. However, holders of patents are not obligated to respond to ITL calls for patents and ITL has not undertaken a patent search in order to identify which, if any, patents may apply to this publication.

Following the ITL call for the identification of patent claims whose use may be required for compliance with the guidance or requirements of this publication, notice of one or more such claims has been received.

By publication, no position is taken by ITL with respect to the validity or scope of any patent claim or of any rights in connection therewith. The known patent holder(s) has (have), however, provided to NIST a letter of assurance stating either (1) a general disclaimer to the effect that it does (they do) not hold and does (do) not currently intend holding any essential patent claim(s), or (2) that it (they) will negotiate royalty-free or royalty-bearing licenses with other parties on a demonstrably nondiscriminatory basis with reasonable terms and conditions.

Details may be obtained from ITL-POINT-OF_CONTACT.

No representation is made or implied that this is the only license that may be required to avoid patent infringement in the use of this publication.

END PATENT_DISCLOSURE_NOTICE2 = <<~END.freeze Patent Disclosure Notice

NOTICE: ITL has requested that holders of patent claims whose use may be required for compliance with the guidance or requirements of this publication disclose such patent claims to ITL. However, holders of patents are not obligated to respond to ITL calls for patents and ITL has not undertaken a patent search in order to identify which, if any, patents may apply to this publication.

As of the date of publication and following call(s) for the identification of patent claims whose use may be required for compliance with the guidance or requirements of this publication, no such patent claims have been identified to ITL.

No representation is made or implied by ITL that licenses are not required to avoid patent infringement in the use of this publication.

END def boilerplate(x_orig) x = x_orig.dup x.root.add_namespace(nil, EXAMPLE_NAMESPACE) x = Nokogiri::XML(x.to_xml) conv = IsoDoc::NIST::HtmlConvert.new({}) conv.metadata_init("en", "Latn", {}) conv.info(x, nil) conv.labels = {nist_division: @nistdivision, nist_division_address: @nistdivisionaddress} file = @boilerplateauthority ? "#{@localdir}/#{@boilerplateauthority}" : File.join(File.dirname(__FILE__),"nist_intro.xml") conv.populate_template((File.read(file, encoding: "UTF-8")), nil) end end end end