Deploying and Managing Apama Applications > Correlator-Integrated Messaging for JMS > Using EDA events in Apama applications > About convention-based EDA mapping > Rules that govern EPL name generation
Rules that govern EPL name generation
When Apama Studio uses an EDA event type schema to generate EPL event type definitions, it derives the package name from the XSD namespace of the corresponding schema types. This ensures the ability to
*Distinguish between elements that have the same name but different namespaces
*Generate the namespace from the package name when creating an XML payload from Apama events
There is a one to one relationship between a namespace in an EDA event schema and an Apama package. For example, if there are two namespaces in the .xsd file then Apama Studio generates EPL event type definitions in two Apama EPL packages.
The following special characters are allowed in namespace and element names that are to be mapped to EPL package names, EPL event type names or EPL event type field names:
*Colon (:)
*Hyphen (-)
*Period (.)
*Underscore (_)
When a name contains one of these characters Apama Studio replaces it with an underscore and prefixes $x$ to the name. The x in $x$ is an ordered list of letters that identifies the characters that were in the name. The following table describes these escape characters:
Escape Character
Description
c
Indicates that a colon (:) was replaced.
f
Indicates that the package name was derived from a non-EDA namespace. If it is the first character in the escape sequence then the package name is the full namespace. For an EDA namespace, the EPL package name does not include the fixed part of the EDA namespace, which is http://namespaces.softwareag.com/EDA/.
h
Indicates that a hyphen (-) was replaced.
n
Indicates that nothing was replaced. However, since an EPL name can contain underscores but cannot have a number as the first character, an n in an escape sequence means one of the following:
*There was an underscore in the EDA name.
*There was a number as the first character in the EDA name or at the beginning of a part of a namespace.
Having the n in the sequence provides the information needed to map the EPL name back to an EDA name.
Exception: If an EDA name contains one or more underscores, but not any other special characters then Apama Studio does not add an escape prefix. This is because underscores are allowed in EPL names. When an underscore is in an EDA name, the EPL escape prefix is needed only if the name also contains a colon, hyphen, or period, or a number is the first character.
p
Indicates that a period (.) was replaced.
u
Indicates that an underscore (_) was replaced.
Apama Studio maps a namespace to an EPL package name as follows:
*The package name contains a period (.) in place of each slash (/).
*For an EDA namespace, the package name contains only the non-fixed part of the namespace. The package name does not contain http://namespaces.softwareag.com/EDA/.
*For a non-EDA namespace, the package name contains the full namespace and f is the first letter in the escape sequence prefixed to the package name.
The following table provides examples of how EDA namespace names become EPL package names:
Namespace
EPL package name
http://namespaces.softwareag.com/EDA/Hello/Big/Data
Hello.Big.Data
http://namespaces.softwareag.com/EDA/Hello-World
$h$Hello_World
http://namespaces.softwareag.com/EDA/Hello.World
$p$Hello_World
http://namespaces.softwareag.com/EDA/Hello_World
Hello_World
http://namespaces.softwareag.com/EDA/Hello_World/101
$un$Hello_World._101
http://namespaces.softwareag.com/EDA/Pulse/1.2
$np$Pulse._1_2
http://namespaces.softwareag.com/EDA/a_small.mixed-bag
$uph$a_small_mixed_bag
http://www.example.com/sample
$fcnpp$http_._.www_example_com.sample
urn:uddi-org:api_v3
$fchcu$urn_uddi_org_api_v3
The following table provides examples of how other EDA names become EPL names:
EDA element name
EPL name
<xsd:element name="MAC-Address"/>
$h$MAC_Address
<xsd:element name="Model.Type"/>
$p$Model_Type
<xsd:element name="Model_Type_Special"/>
Model_Type_Special
Copyright © Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its Subsidiaries and or/its Affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.