Altova RaptorXML+XBRL Server 2024

Formula-Parameter können XML- oder JSON-Format haben.

 

XML-Format

Im Codefragment unten sehen Sie Formula-Parameter im XML-Format.

 

<?xml version="1.0" encoding="utf-8"?>

<options:formula-parameters

  xmlns:options="https://www.altova.com/schemas/altova/raptorxml/options" 
  xmlns:p="http://xbrl.org/formula/conformance/paramstuff"

  xmlns:xs="http://www.w3.org/2001/XMLSchema"

  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

  xsi:schemaLocation="https://www.altova.com/schemas/altova/raptorxml/options https://www.altova.com/schemas/altova/raptorxml/options.xsd">

  

  <options:parameter name="p1">

    <options:value type="xs:string">hello world from new xml (without namespace)</options:value>

  </options:parameter>

  <options:parameter name="p:p1" type="xs:string" value="hello world from new xml"/>

 

</options:formula-parameters>

 

Beachten Sie die folgenden Punkte:

 

Das @type Attribut ist optional und hat den Standardwert xs:string.

Es können mehrere <options:value> Child-Elemente definiert werden, um einem Parameter eine XPath-Sequenz zuzuweisen.

@value und <options:value> können nicht gleichzeitig verwendet werden.

 

JSON-Format

Im Codefragment unten sehen Sie die Formula-Parameter im JSON-Format.

 

{

  "formula-parameters": [

  {

    "name": "p1",

    "values": [

      {

        "type": "xs:string",

        "value": "hello world from json new (without namespace)"

      }

    ]

   }, {

        "name": "ns1:p1",

        "values": [

          {

            "type": "xs:string",

            "value": "hello world from json new"

          }

         ]

       }

   ],

   "namespaces": {

     "xs": "http://www.w3.org/2001/XMLSchema",

     "ns1": "http://xbrl.org/formula/conformance/paramstuff"

   }

}

 

Beachten Sie die folgenden Punkte:

 

Der type Schlüssel ist optional und hat den Standardwert xs:string.

Der xs Schlüssel ist optional und hat den Standardwert http://www.w3.org/2001/XMLSchema.

Der Typ in der Parameterzuordnung wird verwendet, wenn ein Wert direkt als JSON-String definiert ist.

Auch andere Schreibweisen werden derzeit unterstützt:

             {

           "name": "p2",

           "type": "xs:string",

           "value""hello world from json new (without namespace)"

        }, {

           "name": "p3",

           "type": "xs:int",

           "values": ["1", "2"]

        }, {

           "name": "p4",

           "type": "xs: int",

           "values": ["1", {"type": "xs:string""value": "abc"}, "2"]

        }

 

© 2018-2024 Altova GmbH