...
Creates a new or modifies an existing
Code Block | ||||
---|---|---|---|---|
| ||||
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
...
Type | Name | Comment |
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. |
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 | ||||||
---|---|---|---|---|---|---|
|
Options
...
Option | Comment |
---|
Example
...
Code Block | ||
---|---|---|
| ||
#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) | ||||||
---|---|---|---|---|---|---|
|