CDATA and PCDATA.

Hi All,
Can you tell me difference between CDATA and PCDATA which are used in DTD?
Regards,
Rahul

When I googled for "dtd cdata pcdata" and looked at [the first link I got|http://www.w3schools.com/dtd/dtd_building.asp], the answer was right there in bold face type.

Similar Messages

  • Problem with CDATA and new line character

    I parse a xml document with org.w3c.dom, the document contain a CDATA section in which there are more lines of text, each line is terminated with the new line character (\n).
    Example:
    <nota>
    <[CDATA[
    first line
    second line
    third line
    ]]>
    </nota>
    When a parse this node:
    Text txt_nota=(Text)elm_nota.getFirstChild();
    String nota=txt_nota.getData();
    the value returned is one string with no new line characters, example:
    "first linesecond linethird line"
    what's wrong?

    Because i use the string nota into a jsp page and i print the string nota into a textarea and the text is with no newline, example:
    <textarea name="nota" rows="4" cols="60"><%= nota %></textarea>
    the text into textarea is:
    first linesecond linethird line
    but i want that the text displayed into textarea is equal the text into the CDATA section:
    first line
    second line
    third line

  • Embedding HTML in XML CDATA and encoding issues

    Hi all,
    I'm embedding HTML code in a CDATA section. My problem is that, depending on the document, the HTML can be encoded in many formats. I borrowed a piece of code that sniffs that format so i can create String in the "right" encoding (or at least the one that was guessed).
    - If I directly injected those in the CDATA section, i guess they'd be encoded in UTF-8 and some character would be misinterpreted?
    - What if i would transcode the HTML from the sniffed format to utf-8?
    -Are there any issues woth doing this?
    Sorry if this is a dumb question but I'm quite new to that kind of encoding issues.
    BTW i'm using DOM.
    Thanks
    lexo

    I don't know if it's a dumb question. I just don't understand it at all. Encoding issues only arise when you write data from a Java program to an external location, or when you read data from an external location into a Java program. And none of the activities you mentioned there have anything to do with that.
    When you write your XML to an external file, or wherever you write it to, it gets encoded at that moment. The whole thing. Elements, attributes, CDATA sections, the whole thing. Doesn't matter what's in it, the whole thing gets encoded in whatever charset was chosen.
    Does that help?

  • CDATA and XML structure

    Hej!
    I am trying to but an entire XML structure into a CDATA-tag. But have not been successful.
    Im using Xquery and trying to somthing like this:
    I have an variable $example which contains a XML structure. For example:
    $example = <elementA><A1>valueA1</A1><A2><A2a>text2a</A2a><A2b>text2b</A2b></A2><A3>valueA3</A3></elementA>
    I want to something like this <![CDATA[$example]]> to be expanded to <![CDATA[<elementA><A1>valueA1</A1><A2><A2a>text2a</A2a><A2b>text2b</A2b></A2><A3>valueA3</A3></elementA>]]>
    I have tried in many ways (eg by doing concat("<![CDATA[", $example, "]]>") ) and ended up with a CDATA tag that contains only the value of the elements in the tags of A1, A2 and A3. for example the CDATA that is created looks something like this:
    <![CDATA[valueA1text2atext2bvalueA3]]>
    instead of
    <![CDATA[<elementA><A1>valueA1</A1><A2><A2a>text2a</A2a><A2b>text2b</A2b></A2><A3>valueA3</A3</elementA>]]>
    I would really be grateful for any suggestions or tips and pointers on how to solve this.
    Best Regards
    Ninib
    Edited by: NinibEDB on 2010-nov-09 17:35

    Hi,
    Which XQuery processor are you using?
    According to the W3C specifications, the output of CDATA section is part of the serialization process, not the XQuery evaluation. So it's up to the implementor to provide the necessary options.
    The option we need here is the "cdata-section-elements" parameter :
    http://www.w3.org/TR/xslt-xquery-serialization/#XML_CDATA-SECTION-ELEMENTS
    For example, using the Saxon XQuery processor :
    declare option saxon:output "omit-xml-declaration=yes";
    declare option saxon:output "cdata-section-elements=test";
    let $example := "<elementA><A1>valueA1</A1><A2><A2a>text2a</A2a><A2b>text2b</A2b></A2><A3>valueA3</A3></elementA>"
    return <test>{$example}</test>which gives :
    <test><![CDATA[<elementA><A1>valueA1</A1><A2><A2a>text2a</A2a><A2b>text2b</A2b></A2><A3>valueA3</A3></elementA>]]></test>

  • CDATA and envelope format sensitivity

    Hello,
    I am using standard LiveCycle component/service "WebService" in LiveCycle process to call a Web service.
    In SOAP response is CDATA section with xml document that I need to work with.
    In Web-service component properties is section "CDATA list" which should parse all CDATA sections of soap-response to a list variable.
    It works well if the service returns (A)-type response format (see below), but doesn't parse anything for (B)-type.
    So - can WebService component parse CDATA section from generic soap/xml format or does it require (A)-like format ?
    Thanks
    A) works well
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <soapenv:Body>
          <invokeResponse xmlns="http://adobe.com/idp/services">
             <doc xsi:type="ns1:XML" xmlns:ns1="http://adobe.com/idp/services">
                <document>
                    <![CDATA[<?xml version="1.0"?>
                        <foo><alfa>aaa</alfa><beta>bbb</beta></foo>
                    ]]>
                </document>
             </doc>
             <foo>Hello world</foo>
             <i>0</i>
          </invokeResponse>
       </soapenv:Body>
    </soapenv:Envelope>
    B) does not work
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <SOAP-ENV:Body>
          <ns1:someMethod SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="yyy">
             <return xsi:type="xsd:string">
             <![CDATA[
                <?xml version="1.0" encoding="UTF-8"?>
                <response id="0" xsi:noNamespaceSchemaLocation="loc.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                </response>
            ]]>
            </return>
          </ns1:someMethod>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    Can someone help me on this please ?
    Also I have a question that if this is the issue because the Oracle Wallet Manager is not configured. If yes, how can we configure OWM on XE as I dont see OWM installed with XE.

  • CDATA and dbms_xmlgen HOWTO ????

    Hello everybody,
    How can I return CDATA sections from dmbs_xmlgen package.
    Any ideas.
    Thx in advance.
    MS

    Stupid case :(
    ODP.NET XML Support
    Retrieving Query Result Set as XML
    NULL Values
    If any database row has a column with a NULL value, then that column does not appear for that row in the generated XML document.
    zzzzzzz

  • XMLDOM and CDATA

    Guru's,
    I have a requirement using PL/SQL whereby I need to store more that 32K bytes of HTML in an XML Element. Since the content is HTML, it seems to me that I have to use the CDATA method of XMLDOM
    (for example item_node := xmldom.appendChild(item_node, xmldom.makeNode(xmldom.createCDATASection(doc, p_bodycopy)));)
    My issue is that the createCDATASection can only handle a VARCHAR2, and I require it to handle (at most) 64K of information.
    I can use the AppendData procedure w/ Character data, but that creates decode,translation and transformation issues.
    Is there any light at the end of this tunnel? or should I punt.
    The following works very well for everything <= 32K
    item_elmt := xmldom.createElement(doc, 'BodyCopy');
    item_node := xmldom.appendChild(root_node, xmldom.makeNode(item_elmt));
    item_node := xmldom.appendChild(item_node, xmldom.makeNode(xmldom.createCDATASection(doc, p_bodycopy)));
    I am looking for a solution for content >32K
    Any insight is much appreciated.
    -Scot

    Hi Scot. Unfortunately most of the xml packages and functions are brain dead when it comes to handling large data. Most are implicitly tied to varchar limits and lob limitations in PL/SQL.
    To get a CDATA element exactly as you describe, I think you need to resort to building it up from 1st principles using lob methods.
    e.g.
    declare
    v_lob clob;
    v_lob_temp clob;
    begin
    v_lob := '<FamilyHistory><![CDATA[';
    select x.bigdata into v_lob_temp from x1 x where x.item='mysample';
    DBMS_LOB.APPEND(v_lob, v_lob_temp );
    DBMS_LOB.APPEND(v_lob, ']]></FamilyHistory>');
    insert into x2 values('mysample',v_lob);
    end;
    There is an approach using xmltype views based on object types, but these will implicitly xml encode your clob rather than quote it as CDATA (and I don't know a way to prevent this).
    e.g.
    CREATE TABLE x1 (item varchar(25) primary key, bigdata clob);
    -- (insert a very large record)
    CREATE OR REPLACE TYPE x1_t AS OBJECT
    (Holder varchar(25),BookData CLOB);
    CREATE OR REPLACE VIEW vx1 OF XMLTYPE
    WITH OBJECT ID (ExtractValue(sys_nc_rowinfo$, '/ROW/HOLDER')) AS
    SELECT sys_XMLGen(x1_t(x.item, x.bigdata)) from x1 x;
    Here's a sample entry:
    SELECT
         extractvalue(x.SYS_NC_ROWINFO$,'/ROW/HOLDER') as holder
         ,'xml_length: ' || dbms_lob.getlength(x.SYS_NC_ROWINFO$.getclobval()) as xml_length
    FROM vx1 x;
    HOLDER XML_LENGTH
    mysample xml_length: 324198
    Note sql*plus has a problem querying this:
    SQL> select * from vx1;
    ERROR:
    OCI-31167: XML nodes over 64K in size cannot be inserted
    Unless we just go for the clob. In this example the "BOOKDATA" is pure unencoded XML in table X1, but automatically encoded in the xmltype view vx1:
    SQL> set long 200
    SQL> select (SYS_NC_ROWINFO$).GETCLOBVAL() from vx1;
    (SYS_NC_ROWINFO$).GETCLOBVAL()
    &lt;?xml version=&quot;1.0&quot;?&gt;
    &lt;ROW&gt;
    &lt;HOLDER&gt;mysample&lt;/HOLDER&gt;
    &lt;BOOKDATA&gt;&amp;lt;books&amp;gt;
    &amp;lt;book id=&amp;quot;1&amp;quot;&amp;gt;
    &amp;lt;title&amp;gt;the book 1 title&amp;lt;/title&amp;gt;
    &amp;lt;/book&amp;gt;
    &amp;lt;book id=&amp;quot;2&amp;qu

  • Extraction of CData Part and later its embedding

    Hi All,
    Could someone please help me figure out how I can extract from my xml the CData part, which is also an xml. Once I have the CData xml, I will then apply some xslt script on it and then embed the processed xml back in the CData area.
    For example:
    <?xml version="1.0" encoding="UTF-8"?>
    <fareRequest da="true">
    <vcrs>
    <vcr>U2</vcr>
    </vcrs>
    <fareTypes/>
    <tourOps/>
    <flights>
    <flight depApt="SXF" depDate="2012-04-19" dstApt="BUD"/>
    <flight depApt="BUD" depDate="2012-04-25" dstApt="SXF"/>
    </flights>
    <![CDATA[<CreditCardNumber>123456123</CreditCardNumber>]]>
    <limit>20</limit>
    <offset>0</offset>
    <waitOnList>
    <waitOn>ALL</waitOn>
    </waitOnList>
    <coses/>
    </fareRequest>
    I would like to extract the <CreditCardNumber>123456123</CreditCardNumber>, process it with my xslt script and then embed it back in the original xml, e.g. my desired out:
    <?xml version="1.0" encoding="UTF-8"?>
    <fareRequest da="true">
    <vcrs>
    <vcr>U2</vcr>
    </vcrs>
    <fareTypes/>
    <tourOps/>
    <flights>
    <flight depApt="SXF" depDate="2012-04-19" dstApt="BUD"/>
    <flight depApt="BUD" depDate="2012-04-25" dstApt="SXF"/>
    </flights>
    <![CDATA[<CreditCardNumber>*******23</CreditCardNumber>]]>
    <limit>20</limit>
    <offset>0</offset>
    <waitOnList>
    <waitOn>ALL</waitOn>
    </waitOnList>
    <coses/>
    </fareRequest>
    The masking <CreditCardNumber>*******23</CreditCardNumber> above is done by my xslt script.
    What I need to know is how I can extract the CData part and embedd it back.
    Second important thing is that the structure of my input xml is not fix. The input xml could vary in structure, i.e. it might or might not have CData, incase if the CData is not there, the xslt script should simply be applied and masking is performed if required. The masking logic is handled entirely in the xslt script. But in-case, if the CData is present, then the extraction->xslt script->embed logic is applied.
    A pure xslt based solution is not feseable, but some java and xslt solution.
    So in short, I am looking for a kind osolution as to how I can check if CData is present, and if yes, extract its contents, then xslt and then embedding it back in the original xml.
    Thanks.

    Thanks tsuji!
    The problem as stated in my original message is that:
    1). The solution should work (mask) for both the scenarios, i.e. when the element is encapsulated inside CData and without CData.
    With CData (just an example):
    <![CDATA[<CreditCardNumber>123456123</CreditCardNumber>]]>
    And Without CData (just an example):
    <CreditCardNumber>123456123</CreditCardNumber>
    in both the cases, the masking should work.
    2). The input XML was just one example, the final script should be able to take any input xml (w and w/o CDAta and of different structure) and perform masking. The node which is to be masked can also be different.
    For the masking logic, I have already implemented a generic script (see below). I need to extend it, that is, it should be able to take even XMLs with CData in it.
    Masking.xslt
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.2" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ota="http://www.opentravel.org/OTA/2003/05" xmlns:anyway="http://anyway.com/webservices/" xmlns:k="http://webservices.kuoni.ch" xmlns:xft="http://www.exchangefortravel.org/xft/current" xmlns:tu="http://tempuri.org/" xmlns:jet2="http://Jet2.Com/External/2009/01/V4">
    <xsl:output encoding="UTF-8" version="1.0" method="xml" indent="yes" cdata-section-elements="anyway:request k:request k:ForwardRequestResult xft:NameText xft:Description xft:URL xft:From xft:To xft:Code tu:XRq tu:ProcessTransactionXFTUResult libelle nom prenom adresse1 ville pays email"/>
    <xsl:strip-space elements="*"/>
    <!--add coma separated element names without namespace prefix to be masked, dont remove first coma! -->
    <xsl:param name="names">!,Number,CCV,cc_number,cc_cvv,AccountNumber,CardSecurityCode,card_number,options,CreditCardNumber,CardNumber,IssueNumber,SecurityCode,</xsl:param>
    <xsl:template match="/">
    <xsl:apply-templates select="node()"/>
    </xsl:template>
    <xsl:template match="@*">
    <xsl:variable name="attr-name" select="concat(',' , local-name() , ',')"/>
    <xsl:attribute name="{name()}" namespace="{namespace-uri()}">
    <xsl:choose>
    <xsl:when test="string-length(substring-before($names, $attr-name)) > 0">
    <xsl:call-template name="mask"/>
    </xsl:when>
    <xsl:otherwise>
    <xsl:value-of select="."/>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:attribute>
    </xsl:template>
    <xsl:template match="text()">
    <xsl:copy/>
    </xsl:template>
    <xsl:template match="*">
    <xsl:variable name="el-name" select="concat(',' , local-name(), ',')"/>
    <xsl:choose>
    <xsl:when test="string-length(substring-before($names, $el-name)) > 0">
    <xsl:element name="{name()}" namespace="{namespace-uri()}">
    <xsl:call-template name="mask"/>
    </xsl:element>
    <xsl:apply-templates select="@*"/>
    <xsl:apply-templates select="*"/>
    </xsl:when>
    <xsl:otherwise>
    <xsl:element name="{name()}" namespace="{namespace-uri()}">
    <xsl:apply-templates select="@*"/>
    <xsl:apply-templates/>
    </xsl:element>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    <xsl:template name="index-of">
    <xsl:param name="param1"/>
    <xsl:param name="param2"/>
    <xsl:value-of select="string-length(substring-before(concat(' ' ,$param1), $param2))"/>
    </xsl:template>
    <xsl:template name="mask">
    <xsl:variable name="length" select="string-length(.)"/>
    <xsl:choose>
    <xsl:when test="$length > 3">
    <xsl:value-of select="concat ('************', substring(.,$length - 1, 2))"/>
    </xsl:when>
    <xsl:when test="$length > 1">***</xsl:when>
    <xsl:otherwise/>
    </xsl:choose>
    </xsl:template>
    </xsl:stylesheet>
    Thanks again for your help so far.

  • What is DTD (related to BC and XML)?

    Hi all,
    Could you please refer me to links/documents, after giving a brief overview of <b>DTD</b>
    Thanks,
    Charles.

    Hi,
    The purpose of a DTD is to define the legal building blocks of an XML document. It defines the document structure with a list of legal elements. A DTD can be declared inline in your XML document, or as an external reference.
    Internal DTD
    This is an XML document with a Document Type Definition: (Open it in IE5, and select view source)
    <?xml version="1.0"?>
    <!DOCTYPE note [
    ><!ELEMENT note (to,from,heading,body)>
    <!ELEMENT to (#PCDATA)>
    <!ELEMENT from (#PCDATA)>
    <!ELEMENT heading (#PCDATA)>
    <!ELEMENT body (#PCDATA)>
    ]>
    <note>
    <to>Tove</to>
    <from>Jani</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
    </note>
    The DTD is interpreted like this:
    !ELEMENT note (in line 2) defines the element "note" as having four elements: "to,from,heading,body".
    !ELEMENT to (in line 3) defines the "to" element to be of the type "CDATA".
    !ELEMENT from (in line 4) defines the "from" element to be of the type "CDATA"
    and so on.....
    External DTD
    This is the same XML document with an external DTD: (Open it in IE5, and select view source)
    <?xml version="1.0"?>
    <!DOCTYPE note SYSTEM "note.dtd">
    <note>
    <to>Tove</to>
    <from>Jani</from>
    <heading>Reminder</heading>
    <body>Don't forget me this weekend!</body>
    </note>
    This is a copy of the file "note.dtd" containing the Document Type Definition:
    <?xml version="1.0"?>
    <!ELEMENT note (to,from,heading,body)>
    <!ELEMENT to (#PCDATA)>
    <!ELEMENT from (#PCDATA)>
    <!ELEMENT heading (#PCDATA)>
    <!ELEMENT body (#PCDATA)>
    Why use a DTD?
    XML provides an application independent way of sharing data. With a DTD, independent groups of people can agree to use a common DTD for interchanging data. Your application can use a standard DTD to verify that data that you receive from the outside world is valid. You can also use a DTD to verify your own data.
    For more information, please check this links.
    http://help.sap.com/saphelp_nw04/helpdata/en/64/0bee3da7138e5be10000000a114084/content.htm
    http://help.sap.com/saphelp_46c/helpdata/en/dc/6b827c43d711d1893e0000e8323c4f/content.htm
    Regards,
    Ferry Lianto

  • Reading the data from CDATA.

    > Now XSLT ignores all the data in CDATA and i get nothing in output.  
    This is correct behaviour:
    http://www.w3.org/TR/2008/REC-xml-20081126/#sec-cdata-sect
    there is nothing that you can do here.

    The first code snippet in my post is a code from : "source text view " .
    The Test XML entered by me was
    <catalog>
         <cd>
              <title>Empire Burlesque</title>
              <artist>Bob Dylan</artist>
              <country>USA</country>
              <company>Columbia</company>
              <price>10.90</price>
              <year>1985</year>
         </cd>
         <cd>
              <title>Empire Burlesque2</title>
              <artist>Bob Dylan2</artist>
              <country>USA</country>
              <company>Columbia2</company>
              <price>10.90</price>
              <year>1985</year>
         </cd>
    <cd>
              <title>Empire Burlesque3</title>
              <artist>Bob Dylan3</artist>
              <country>USA</country>
              <company>Columbia3</company>
              <price>10.90</price>
              <year>1985</year>
         </cd>
    </catalog>
    Do you wanna point out that the PI will not add CDATA in real scenario??
    I have not configured complete scenario as sender system is not yet ready to send data.

  • Pausing swfs and audio in a browser when the tab is out of focus

    I'm trying to code my flash file so that the html will pause all swfs AND audio when the tab is out of foucs.  I found this code on http://frontenddeveloper.net/wiki/index.php?title=JavaScript_and_VBScript_Injection_in_Act ionScript_3 and it works,but not completely. It only pauses the movie clips that are in the Flash file and not any that are exteranlly loaded with audio included.
    How can I adjust it to pause the externally loaded swfs that are loaded to a mc within my main movie clip and the audio OR what should I use in place of this code?  Someone mentioned on a different post that I needed to use a window.onblur funcition, but they didn't give details.
    import flash.display.MovieClip;
    import flash.utils.setTimeout;
    // This is a more "safe than sorry" setting, since multiple domains
    // have entry into my site. Can be removed or hardcoded if you feel
    // secure or insecure, as you see fit.
    flash.system.Security.allowDomain("*");
    // Throw any errors around to make sure somebody actually gets them.
    ExternalInterface.marshallExceptions = true;
    // This is not the most ideal way to toggle animations on and off, but
    // it's thorough, generic, and simple. Iterate all movieclips within
    // clip, shutting them down each in turn. A better, but much more tedious
    // method would be to target specific clips using dotpath notation, telling
    // each in turn to turn off or on depending on what we need.
    // BUT this is just a demo, and what we're really interested in is the
    // event-handling mechanism that actually calls this routine, and not the
    // routine itself.
    function toggleAllClips(doAnim, clip) {
    if ( clip is MovieClip) {
      if (doAnim) {
       clip.play();
      } else {
       clip.stop();
      for (var i = 0; i<clip.numChildren; i++) {
       toggleAllClips(doAnim, clip.getChildAt(i));
    function animOn(e:*=null) {
    toggleAllClips(true, this.mainMC);
    function animOff(e:*=null) {
    toggleAllClips(false, this.mainMC);
    function injectPrep(e:*=null) {
    try {
      ExternalInterface.addCallback("jsanimOn", animOn);
      ExternalInterface.addCallback("jsanimOff", animOff);
    } catch (e) {
      trace(e);
    function injectListeners(e:*=null) {
    try {
      // Object/Embed ID of this movie needs to be inserted into the
      // JavaScript before we actually wrap and send it to the browser:
      var jsfix=js.toString().replace(/xxx/g, ExternalInterface.objectID);
      ExternalInterface.call(jsfix);
    } catch (e) {
      trace(e);
    // Using timeouts ensures the movie is actually done loading before
    // these fire, helping compatibility for a few browser versions.
    setTimeout(injectPrep,0);
    setTimeout(injectListeners,100);
    JAVASCRIPTS
    JavaScript needs to be wrapped in a tag, a cdata, and a closure
    function in order to be wrapped up and sent to the browser.
    Note that an ActionScript function will replace all instances
    of "xxx" with the actual ID used for this SWF.
    We're battling some major bugs and crossbrowser idiosyncrasies
    here:
    1) In Internet Explorer the 'onblur' event is implemented
        incorrectly (as opposed to Firefox/Mozilla browsers). It is
        wrongly fired when focus is switched between HTML elements
        *inside* a window. As a result, we have to use onfocusout
        instead of onblur, and keep track of which element is active.
        If we focusout and the active element is not the previous
        active element, then we haven't actually "blurred" and dont
        want to trigger Flash.
    2) Firefox has problems interpreting both getElementById and
        document["swf"] when dealing with "twicebaked" object/embeds.
        Adobe's method of finding the swf fails to address the fact
        that document["swf"] sometimes returns an array in this
        situation rather than an object ref, and getElementById
        sometimes confuses name and id.
    3) When a window is created in Firefox, it doesn't actually have
        "focus" (event though it appears to) and therefore won't "blur"
        unless you actually click in it first, i.e if you open up a
        window, then immediately send it to the background, it never
        gets the command to halt the flash. So we have to explicitly
        focus the blasted thing to get it to work properly.
    4) Because of irregularities caused by Ajax, the way browsers shut
        down, and other factors, there's a good chance our swf won't
        be there when a blur (or focusout) event occurs. Therefore we
        need an explicit check within the event handler itself.
    5) Finally, we want to wrap everything inside a wrapper-closure
        function, to keep everything safe from being stepped on. Lucky
        us, we have to do this anyways to get everything to fit inside
        a single ExternalInterface.call event.
    var js:XML = <script><![CDATA[
    ( function() {
      var active_element; // tracker for ie fix;
      var bIsMSIE = false;
      // Modified version of Adobe's code resolves a bug in FF:
      function getSWF(movieName) {
        if (navigator.appName.indexOf("Microsoft") != -1) {
          return window[movieName];
        } else {
          // Resolves a bug in FF where an array is sometimes returned instead of a
          // single object when using a nested Object/Embed.
          if(document[movieName].length != undefined){
            return document[movieName][1];
          return document[movieName];
      // Need to check for swf each time we try this because the swf may actually be gone
      // because of ajax or a window closure event. Prevents error dialog from popping up.
      // Future release should check for this condition and then remove the calling event
      // so it doesn't keep triggering.
      function animOff(){
        if (bIsMSIE && (active_element != document.activeElement)) {
          active_element = document.activeElement;
        } else {
          var logoThang = getSWF("xxx");
          if(logoThang){logoThang.jsanimOff();}
      function animOn(){
        if (bIsMSIE && (active_element != document.activeElement)) {
          active_element = document.activeElement;
        } else {
          var logoThang = getSWF("xxx");
          if(logoThang){logoThang.jsanimOn();}
      // Add the listeners. Hear ye, here ye.
      if (typeof window.addEventListener !== "undefined") {
        // Firefox, Mozilla, et al.
        window.addEventListener("blur", animOff, false);
        window.addEventListener("focus", animOn, false);
      } else if (typeof window.attachEvent !== "undefined") {
        // Internet Explorer
        bIsMSIE = true;
        window.attachEvent("onfocus", animOn);
    // Another bug: window.onblur ALWAYS fires in IE, so
    // we have to keep track of what we're clicking using
    // another method:
    active_element = document.activeElement;
    document.attachEvent("onfocusout", animOff);
      // Necessary to trigger toggling in FF if the page hasn't actually been clicked in and the page
      // is sent to the background. Can be commented out if necessary, e.g. if you don't want the page
      // popping to the top or want focus to remain somewhere else like a form field.
      window.focus();
    ]]></script>;

    I added this code and it removes the externally loaded swfs.  I don't want that, I want them to pause and then resume when the tab is back in foucs.  Also, the main code restarts the main movie clip upon refocusing too.
    Added code:
    function toggleAllLoaders(doAnim, loader) {
    if ( loader is Loader) {
      if (doAnim) {
       loader.play();
      } else {
       loader.stop();
      for (var i = 0; i<loader.numChildren; i++) {
       toggleAllLoaders(doAnim, loader.getChildAt(i));
    I added the new function to all of the places that had the "toggleAllClips" function.

  • OSB: Strip CDATA while sending to email

    Hi
    My idea is user will receive html in his email with our dynamic text via OSB 11g.
    I am sending an HTML code through OSB email.
    HTML file has a template.
    I insert dynamic text (text+xml actually) at a specific location in HTML.
    business service has input type = text, output type = none and protocol is email. Content-Type of business service is changed to "text/html" at run time by replace action for transport header in Route action.
    Issue is: In mail, in message body intial tags of dynamic text is missing and I can see find ]]> at the end in my email message body. When I right click on received HTML and click on "view source", I see <![CDATA and ]]> encapsulates my dynamic text.
    I can not see <![CDATA and ]]> in my message flow though it must exist since when I tried fn-bea:serialize() with email body content OSB gave me error of unbalanced tag metadata for <![CDATA.
    Is there a way to strip <![CDATA and ]]> ?? I don't wish my end user to see ]]> in message body.
    Thanks and Regards
    Swapnil Kharwadkar

    I think the below function will do the job,
    If the InputString=<![CDATA[        
          <AddressLine1>UNIT 21 WINDSOR PARK</AddressLine1>
          <AddressLine2>50 WINDSOR AVENUE</AddressLine2>
    fn-bea:inlinedXML($InputString)
    wll provide out put as
    Simple XML tag
    +<?xml version="1.0" encoding="UTF-8" ?>+
    +<AddressLine1>UNIT 21 WINDSOR PARK</AddressLine1>+
    +<AddressLine2>50 WINDSOR AVENUE</AddressLine2>+
    Please let me know, how you go.
    Thanks,
    Vijay

  • How can I include CDATA in the node-value?

    Hi Experts,
    Via XI I map an incoming mail message to an outgoing XML. To be sure to not run into problems, I want to put <![CDATA[ and ]]> around the node-values.
    Currently, I just do this in my message-mapping via a concatenate. The result LOOKS fine, but the XML-parser on the receiving application treats the CDATA as part of the total string and not as an indicator to accept every charachter within the node-value.
    How can I put this CDATA around the node-values in a correct manner?
    Thanks for your help!
    Regards
    William

    Hello,
    These Links will help you....
    This might help
    Message Mapping - same structure
    /people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp
    http://www.cxml.org/files/downloads.cfm
    ******************************Reward points,if found useful

  • Need help with XML Compatibility between CS3 and CS4

    I'm not a Dreamweaver guru but I am hoping someone will recognize my issue and be able to provide meaningful feedback.
    Background:
    A developer buddy and I are working together to create a new home page for an online retailer that utilizes flash banners.  We're using XML to update the content of the banners.  My buddy is creating the XML file and sending it to me to populate with content (i.e. descriptions, images, image paths, etc.).  He is creating the XML file in CS3 and I am editing in CS4.  Here's the issue:  Whenever he uploads the populated XML file to the server the banners are displayed correctly.  If I take the same file and upload it without editing, it works great.  However, if I open the file, edit and resave before uploading to the web server, the the banners all have extra spaces between each line of content - almost as if it were double spaced.  If you look at the code, the code looks fine.  In fact, the code looks exactly like it did when my buddy sent the file to me.  I believe we have isolated the problem to something weird with my installation of DW.  I have downloaded and installed any and all updates.  Oh yeah he's using a MAC version and I am using the PC version of DW.
    Has anyone seen anything like this before???
    Help...

    Thank you for your response.
    The code is listed below and to tell you the truth the following code is both good and bad.  As I mentioned before, if my buddy sends me this xml file and I upload it to the server, it works fine.  If I open the file and immediately save it without making any changes then upload it, I experience the previously described promblem.  It's very strange.  The code in both files is identical.
    To get a clearer picture of what I am describing, go to http://www.everythingministry.com/beta3.htm.  The book descriptions appear correctly under the "New and Recommended" tab.  However, whenever I edit any one of the six xml files that control the content for each of these tabs it ends up looking like what you currently see under the "New Music" tab.  I have actually tried to update from 2 different machines running DW CS4.
    Below are the xml files for the two tabs I referenced in the paragraph above:
    ts_new.xml
    <items>
      <config
      Milliseconds="5000"
      Distance="3"
      BorderColor="0xffffff"
      TargetLink="_top"
      TextYPosition="200"
      MaxDisplayContent="6"
      ContentWidth="148"
      ContentHeight="300"
      TransitionSpeed="0.8"
      TransitionType="0"
      ShowMouseOver="0"
      ShowBorder="1"
      ShowGlass="1"
      />
       <content>
        <image>images/crazylove.jpg</image>
        <description><![CDATA[Crazy Love
    by Chan Francis
    Price: $11.99
    You Save: 20 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/crazylove.aspx</link>
      </content>
    <content>
        <image>images/underthesheets.jpg</image>
        <description><![CDATA[Under the Sheets
    by Dr. Kevin Leman
    Price: $9.99
    You Save: 29 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/underthesheetsthesecretstohotsexinyourmarriage.aspx</link>
      </content>
    <content>
        <image>images/outliveyourlife.jpg</image>
        <description><![CDATA[Outlive Your Life
    by Max Lucado
    Price: $19.99
    You Save: 20 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/outliveyourlifebymaxlucadohardcover.aspx</link>
      </content>
    <content>
        <image>images/lovedare.jpg</image>
        <description><![CDATA[Love Dare Day By Day
    Wedding Edition
    Price: $16.79
    You Save: 27 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/lovedaredaybyday-weddingedition.aspx</link>
      </content>
         <content>
        <image>images/lifeinterrupted.jpg</image>
        <description><![CDATA[Life Interrupted
    by Priscilla Shirer
    Price: $11.99
    You Save: 20 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/lifeinterruptednavigatingtheunexpected.aspx</link>
      </content>
    <content>
        <image>images/faithfulfasting.jpg</image>
        <description><![CDATA[Faithful Fasting
    by Errica L. Williams
    Price: $8.79
    You Save: 20 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/faithfulfasting.aspx</link>
      </content>
      <content>
        <image>images/whencouples.jpg</image>
        <description><![CDATA[When Couples Walk Together
    Price: $9.59
    You Save: 20 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/whencoupleswalktogetherjan2011-paperback.aspx</link>
      </content>
    </items>
    ts_music.xml
    <items>
      <config
      Milliseconds="5000"
      Distance="3"
      BorderColor="0xffffff"
      TargetLink="_top"
      TextYPosition="200"
      MaxDisplayContent="6"
      ContentWidth="148"
      ContentHeight="300"
      TransitionSpeed="0.8"
      TransitionType="0"
      ShowMouseOver="0"
      ShowBorder="1"
      ShowGlass="1"
      />
       <content>
        <image>images/untilthewholeworldhearscd.jpg</image>
        <description><![CDATA[Until the Whole
    World Hears
    Price: $12.76
    You Save: 20 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/untilthewholeworldhearscd.aspx</link>
      </content>
    <content>
        <image>images/move.jpg</image>
        <description><![CDATA[Move
    by Thirda Day
    Price: $11.19
    You Save: 20 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/move.aspx</link>
      </content>
    <content>
        <image>images/andifourgodisforus.jpg</image>
        <description><![CDATA[And If Our God
    Is For Us
    Price: $11.19
    You Save: 20 %
    <img src="images/addtocart.jpg" width="146" height="17">]]></description>
        <link>http://www.everythingministry.com/andifourgodisforuscd.aspx</link>
      </content>
    </items>

  • Problem with CDATA

    Hello
    I have this schema:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xs:schema targetNamespace="com/ejie/validationResponse/xml" xmlns:ns="com/ejie/validationResponse/xml" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
         <xs:element name="data">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="ns:respuesta" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="respuesta" type="xs:string"/>     
         <xs:element name="serviceresponse">
              <xs:complexType>
                   <xs:sequence>                    
                        <xs:element ref="ns:data"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>
    and when i try to insert this in the "respuesta"
    <empresas><TIPOXML>OK</TIPOXML></empresas>
    it doesn't insert the CDATA and i want the CDATA to be inserted.
    if for example i insert this:
    <empresas><TIPOXML><value>OK</value></TIPOXML></empresas>
    it works ok ... i don't know why.
    The code i try is this way (very very simple)
    String sXML = "<empresas><TIPOXML>OK</TIPOXML></empresas>";
    ServiceresponseDocument srd = ServiceresponseDocument.Factory.newInstance();
    Serviceresponse sr = srd.addNewServiceresponse();
    Data data = sr.addNewData();
    data.addRespuesta(sXML);
    System.out.println(srd.xmlText());
    Even if i insert the CDATA manually then it appears:
    <[CDATA .........
    Any idea?
    thanks in advance
    Taja                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    And also with an XML that is more than 550 characters the CDATA is not added...
    We're lost. We have added the question also directly to bea but they don't respond.
    Any idea?
    For example:
    <empresas><TIPOXML><Value>OKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK</Value></TIPOXML></empresas>

Maybe you are looking for

  • How do I increase the number of lines presented in a drop down list?

    When I am entering a single character/number for each of a random selection of three letters in a password verification, I get a drop down list from A to S only, the first 20. Accessing letter T to number 9 means scrolling down. How can I increase th

  • Change pressed button Color

    Hi, I want to change my pressed button Color and I haven't been able to find a way, I tried creating my own button and add a listener when it is pressed and then change its background color but it doesn't work! it works for enter and exit but not for

  • TCode to find the list of Leads &quotations for whcih orders arenot created

    HI SAP CRM Experts, Could you please provide me transaction code(s) in CRM when I want to download list of all leads, opportunities and quotations from which the sales orders havenu2019t been created yet? or How can i achieve this ? Thanks in advance

  • Error R6034 in simple MFC Application with OCCI

    Hello everyone, I´m new to the whole occi-topic, and have a little problem. After about 3 days of try and error and endless searching through forums I finally managed to make my first application with occi to run. It´s a Win32 console application. Af

  • InDesign 5.5 crashes - won't launch in 10.8.2

    InDesign CS 5.5 will not launch in Mountain Lion  10.8.2- is there a solution?