#14 Handle CDATA in VALUE strings

sfcb (22)

According to the Specification for the Representation of CIM in XML with regard to strings in VALUE elements:


"The VALUE element is used to define a single (non-array and non-reference) CIM Property value, CIM Qualifier value, or a CIM Method Parameter value.


"Values are not type-validatable using DTD, so each value appears in PCDATA format irrespective of the type. The TYPE attribute of the parent element will determine the (CIM) type of the value. The format of the PCDATA content depends on the CIM type, and is described in what follows.

"String Values

"If the CIM type is string, then the PCDATA value MUST be a sequence of zero or more UCS-2 characters. The value MUST NOT be surrounded by string delimiter characters (such as double-quote or single-quote). The actual representation of characters depends on the encoding attribute defined for the <?xml> processing instruction.

"If this value contains reserved XML characters, then this value MUST either be enclosed within the standard XML data escape sequence <![CDATA[ ... ]]>, or standard XML character escaping mechanisms MUST be applied to those characters.

"In particular if the content contains the ]]> sequence, the CDATA escape mechanism MUST NOT be used."

sfcb does not appear to support this. I sent a createInstance request that failed:

<--- request begin 2012.03.23 07:01:29.703 -----
<?xml version="1.0" encoding="UTF-8"?>

<IMETHODCALL NAME="CreateInstance">
<NAMESPACE NAME="interop"/>
<PROPERTY NAME="CreationClassName" TYPE="string">
<PROPERTY NAME="Destination" TYPE="string">
<PROPERTY NAME="Name" TYPE="string">
---- request end ------>
<--- response begin 2012.03.23 07:01:29.843 ----
<?xml version="1.0" encoding="utf-8" ?>
<ERROR CODE="1" DESCRIPTION="invalid imethodcall XML"/>
---- response end ----->


  • Dave Blaschke

    Dave Blaschke - 2012-03-23

    The Java CIM Client has no dependency on this, I am merely bringing the issue to your attention. The bug was reported within IBM Director between the Client and OpenPegasus.

  • Dave Blaschke

    Dave Blaschke - 2012-03-31

    Need to be able to handle multiple CDATA sections. From Andreas Maier:

    CIM-XML is silent about CDATA sections. The interpretation is that because CDATA sections are a standard XML ability, they are also allowed in CIM-XML.

    So we need to check the W3C XML spec on what it says about mixing: http://www.w3.org/TR/REC-xml/

    Rule [43] in subclause 3.1 clearly shows that CDATA sections (ABNF rule CDsect) can be mixed arbitrarily with character data (ABNF rule CharData), including multiple occurrences of CDATA sections in the same XML element content. The only thing that is excluded is nesting of CDATA sections.

  • Chris Buccella

    Chris Buccella - 2013-02-12
    • component: --> sfcb
  • Chris Buccella

    Chris Buccella - 2013-02-21

    Ticket moved from /p/sblim/bugs/2400/

    Can't be converted:

    • _component: sfcb
    • _milestone: Standards_Compliance
    • _priority: 5
  • Michael Chase-Salerno

    • category: --> Standards
    • milestone: Standards_Compliance --> 1.4.5
  • Chris Buccella

    Chris Buccella - 2013-03-08
    • milestone: 1.4.5 --> backlog
  • Andreas Maier

    Andreas Maier - 2015-01-19

    Note that DSP0201 2.4.0 has added section "Escaping of element content and attribute values", which explains details on CDATA support, including the nesting of CDATA sections and how it can be mixed with XML-based escaping.
    Implementers of a fix for this bug should definitely read that section.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks