@@ -778,6 +778,56 @@ LIBSBML_EXTERN
778
778
SBMLNamespaces_t **
779
779
SBMLNamespaces_getSupportedNamespaces (int *length);
780
780
781
+ /* *
782
+ * Add an XML namespace (a pair of URI and prefix) of a package extension
783
+ * to the set of namespaces within this SBMLNamespaces object.
784
+ *
785
+ * The SBML Level and SBML Version of this object is used.
786
+ *
787
+ * @param sbmlns the SBMLNamespaces_t structure to add to.
788
+ * @param pkgName the string of package name (e.g. "layout", "multi").
789
+ * @param pkgVersion the package version.
790
+ * @param prefix the prefix of the package namespace to be added.
791
+ * The package's name will be used if the given string is empty (default).
792
+ *
793
+ * @copydetails doc_returns_success_code
794
+ * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
795
+ * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t}
796
+ *
797
+ * @note An XML namespace of a non-registered package extension can't be
798
+ * added by this function (@sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t}
799
+ * will be returned).
800
+ *
801
+ * @see addNamespace(@if java String, String@endif)
802
+ */
803
+ LIBSBML_EXTERN
804
+ int
805
+ SBMLNamespaces_addPackageNamespace (SBMLNamespaces_t *sbmlns,
806
+ const char *pkgName,
807
+ unsigned int pkgVersion,
808
+ const char *prefix);
809
+
810
+ /* *
811
+ * Add the XML namespaces of package extensions in the given XMLNamespace
812
+ * object to the set of namespaces within this SBMLNamespaces object
813
+ * (Non-package XML namespaces are not added by this function).
814
+ *
815
+ * @param sbmlns the SBMLNamespaces_t structure to add to.
816
+ * @param xmlns the XML namespaces to be added.
817
+ *
818
+ * @copydetails doc_returns_success_code
819
+ * @li @sbmlconstant{LIBSBML_OPERATION_SUCCESS, OperationReturnValues_t}
820
+ * @li @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t}
821
+ *
822
+ * @note XML namespaces of a non-registered package extensions are not
823
+ * added (just ignored) by this function. @sbmlconstant{LIBSBML_INVALID_ATTRIBUTE_VALUE, OperationReturnValues_t} will be returned if the given
824
+ * xmlns is @c NULL.
825
+ */
826
+ LIBSBML_EXTERN
827
+ int
828
+ SBMLNamespaces_addPackageNamespaces (SBMLNamespaces_t *sbmlns,
829
+ const XMLNamespaces_t * xmlns);
830
+
781
831
END_C_DECLS
782
832
LIBSBML_CPP_NAMESPACE_END
783
833
0 commit comments