Versions Compared

Key

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

...

  Creates a new or modifies an existing

Code Block
languagecpp
themeConfluence
EdmiError edmiCreateXMLConfiguration(SdaiSchema      schemaId,
                                      SdaiString      xmlConfigurationName,
                                      SdaiString      xmlConfigurationString,
                                      SdaiString      nameSpace,
                                      SdaiString      nameSpaceAlias,
                                      SdaiString      xmlSchemaURL,
                                      SdaiUnsignedInt options,
                                      SdaiInstance    *xmlConfigurationId);


Creates a new XML Configuration for a compiled express schema in the EDMdatabase.

...

Any number of XML Configurations may be defined for each express schema. XML Configurations are stored and handled in the same way as query schemas and rule schemas. All XML Configurations are unique instances of the edm_xml_configuration entity in the ExpressDataManager model.

...

XML Configurations are protected objects in the EDMdatabase. Ownership and access rights may be set up individually on each XML Configuration in the same way as for any other protected database object in EDM.
 

...

Arguments

...

TypeNameComment
 SdaiSchema

SchemaId

A numeric schemaID that uniquely identifies the assosiated associated Express schema in an EDMdatabase.

 SdaiString

XmlConfigurationName

A unique name that may be used for later reference to the XML Configuration. The name of the configuration should be the same as the id attribute of the configuration element in the XML.
<configuration id="contained">
<option naming-con ……………(complete sentence)

 SdaiString

xmlConfigurationString

The actual configuration XML to be stored.

 SdaiString

nameSpace

The namespace string to associate with the configuration. The parameter is optional. This is the namespace of elements contained in the UOS element of the generated XML

 SdaiString

nameSpaceAlias

The namespace alias related to the namespace above.

 SdaiString

xmlSchemaURL

The XML Schema url URL related to the namespace above.

 SdaiUnsignedInt

options

Currently unused.

 SdaiInstance

xmlConfigurationId

The instance Id of the XML Configurations insert in the entity extent of edm_xml_configuration in the ExpressDataManager model.

Option Description

 

Currently unused.

...

EDM XML configuration

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

 

Options

...

  

OptionComment

 

Example

...

 

Code Block
languagecpp
 #define S_MALLOC_FILE_SIZE 8194

...


 EdmiError rstat;

...


 SdaiSchema schemaId;

...


 SdaiString schemaName = "ifc2x2";

...


 SdaiInteger numRead;

...


 SdaiString xmlConfigFile = "c:/home/Johnny/ifcXmlConfigFile.xml";

...


 SdaiString xmlConfigName = "i-ifc2x2";

...


 SdaiInteger fileSize = S_MALLOC_FILE_SIZE;

...


 SdaiString xmlConfigString = (SdaiString *) malloc (fileSize);

...


 SdaiInstance xmlConfigId;

...


 FILE *fp = NULL;

...


  
 rstat = edmiGetSchema(schemaName, &schemaId);

...


 if ((fp = fopen(xmlConfigFile, "r")) == NULL) {

...


 /* error message */

...


 goto Error;

...


 }

...


 xmlConfigurationString = (char *) malloc (fileSize);

...


 numRead = fread(xmlConfigString, sizeof(char), fileSize, fp);

...


 xmlConfigString[numRead] = '\0';

...


 fclose(fp);

...


  
 if (rstat = edmiCreateXMLConfiguration(schemaId, xmlConfigName,

...


 xmlConfigString, NULL,

...


 NULL, NULL, NULL,

...


 &xmlConfigId)) {

...


 printf("\nError %d in edmiCreateXMLConfiguration: %s", rstat,

...


 edmiGetErrorText(rstat));

...


 goto Error;

...


 }

...


 printf("\nCreated XML Configuration with Id %d", xmlConfigId);

...


 . .

...

 .
  
 XML CONFIGURATION FILE EXAMPLE;
 <?xml version="1.0" encoding="UTF-8"?>

...


 <iso_10303_

...

28>
 <!-=================================================================->

...


 <!

...

- IFC XML namespace and schema

...

 ->

...


 <!

...

- Namespace: +http://www.iai-international.org/ifcXML/IFC2X2_FINAL+

...

 ->

...


 <!

...

- Namespace alias: "ifc"

...

 ->

...


 <!

...

- XML Schema: "{PATH}IFC2X2_FINAL.xsd"

...

 ->

...


 <!-=================================================================->

...


 <configuration id="ifcxml"

...


 targetNamespace="http://www.iai-international.org/ifcXML/IFC2X2_FINAL">

...


 <!

...

- All instances on root level.

...


 All references by reference

...

 ->
 <option naming-convention="preserve-case"

...


 exp-type="root"

...


 exp-attribute="double-tag"

...


 tagless="true"

...


 inheritance="false"

...


 flatten="false"

...


 sparse="false"/>

...


 </configuration>
  
 <configuration id="ifcxml_tagged_aggregate"

...


 targetNamespace="http://www.iai-international.org/ifcXML/IFC2X2_FINAL">

...


 <!

...

- All instances on root level.

...


 All references by reference

...

 ->
 <option naming-convention="preserve-case"

...


 exp-type="root"

...


 exp-attribute="double-tag"

...


 tagless="false"

...


 flatten="false"

...


 sparse="false"/>

...


 </

...

configuration>
 </iso_10303_

...

28>

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "model" and parent = "6062220"