Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Emakin supports the mostly used namespaces in XML standard. Namespaces list allows to import importing the data models or assign assigning prefix for used namespaces.

What is namespace?

XML namespaces are used for providing uniquely named elements and attributes in an XML document.

A simple example would be to consider an XML instance that contained references to a customer and an ordered product. Both the customer element and the product element could can have a child element named id. References to the id element would therefore be ambiguous; but placing them in different namespaces would remove the ambiguity.

Process Namespace

In emakin, after you define your data model, it's its namespace is set to be empty by default. Using empty namespace is not harmful, but you may want to set an a namespace to your data model if you need to exchange data with other external applications. 

Adding a new namespace with empty prefix will change your data model schema to new namespace and all of your data is now stored in declared namespace URI.

Image Removed

Importing Namespaces

If you have an external system and need to use it's its data types in your model; you can add it as a new namespace and provide XML Schema Location to load. If you specified a schema location, Emakin will be try to download a schema and store it in the "External Xml Schema Sets" to use. If schema is not accessible from the network, you can manually add (with basic copy and paste) XSD file content to the "External Xml Schema Sets".

Image Removed

Scripting Namespaces

You can access data model elements as usual in process namespace even you define a namespace. For example following script will continue run as usual.

Code Block
languagejs
var customers = $Xml.Select('Customers/Customer');

If you need to access other namespaces you need to add to namespaces with an namespace prefix. For example you can access external elements with following script:

...

...

var orders = $Xml.Select('Customers/Customer//ext:Order');

Registered Namespaces

Emakin provides a couple of namespaces to make an easier process development. 

Emakin Forms (http://schemas.emakin.com

...

)

Contains Contain generic and basic data models. To import emakin forms namespace, please use "http://schemas.emakin.com/forms" namepace namespace and same location.

After you import namespace you can use following data models:

Identity

Specifies an identity like Organization Unit, Position, User or Group. Identity element contains id number of identity with Caption, Type, Domain attributes.

Emakin form designer recognizes this data type proposes to use , and proposes the using of an identity picker control.

Image Removed

Emakin Form Controls (http://schemas.emakin.com/forms/controls)

Contains composite data models. To import emakin form controls namespace please use "http://schemas.emakin.com/forms/controls" namespace and same location.

Discussion

Specifies a discussion tree in threaded format.

Emakin form designer recognizes this data type and proposes to use discussion control.

Image Removed

...

Scripting with Namespaces

You can access data model elements as usual in process namespace, even if you defined a namespace. For example, the following script will continue to run as usual.

Code Block
languagejs
var customers = $Xml.Select('Customers/Customer');

If you need to access the other namespaces you need merge prefix and element names with <prefix>:<elementname> format. For example you can access external elements with following script:

Code Block
languagejs
var orders = $Xml.Select('Customers/Customer//ext:Order');