Self closing tags appearing in xquery

I am working on a migration project where the weblogic is getting migrated from weblogic 8 to 10.x
my application uses xquery and when upgraded to higher version i can see some self closing tags getting created in the transformed xml which is not the case with 8.1.
for example:
I have given a simple declaration as below
let $a  := <find an attribute value>
return
<abc:value>{$a}</abc:value>
if the "find an attribute value" returns null then in weblogic 8 the node will not be sent in transformed xml but in weblogic10.x it is parsing the node as self closing one like <abc:value/>
Is this an issue with migration? I know that the xquery upgraded to 2004 and I did took care of that part.

So workaround for me in this case would be? as i have number of direct mappings happening in my code of 8.1 and definitely I can't keep an if else block to make it work.
Well, as you've been relying on a bug then I guess you now have to correct your code.
I don't see how you can do it without using a conditional block.

Similar Messages

  • Setting node value of self closed tags

    Hi all, I was just wondering if anyone knew the answer to this problem, I'm new to this level of java programming and I've been reading documentation till my eyes have started bleeding. When I use the setNodeValue() function on an element, it works fine UNLESS the node is self closed, in which case i cannot access it as it comes up as null. If anyone can give a sample code, or point me in the right direction I'd appreciate it

    by "it" i mean the node itself, and by "comes up as", i mean that the value of the node (and data type apparently) is null. Here is the code snippet that i currently have;
    NodeList nodeLst = doc.getElementsByTagName(repeatedNode);
    for (int s = 0; s < nodeLst.getLength(); s++) {
         Node fstNode = nodeLst.item(s);
         if (fstNode.getNodeType() == Node.ELEMENT_NODE) {
              Element fstElmnt = (Element) fstNode;
              NodeList fstNmElmntLst = fstElmnt.getElementsByTagName("status");
              Element fstNmElmnt = (Element) fstNmElmntLst.item(0);
              Node test = (Node) fstNmElmntLst.item(0);
              if (fstNmElmnt != null){
                   NodeList fstNm = fstNmElmnt.getChildNodes();
                   if ( ((Node) fstNm.item(0)) != null ){
                        ((Node) fstNm.item(0)).setNodeValue("testing setvalue");
    }Notice the checks against null that I have in the code, those are to check against the self closed tages (eg <node />). I realize that there is nothing wrong with xmnl being formatted in this way, I just need to find a way to set values in those nodes. From reading the documentation on setNodeValue() ( [http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/Node.html#setNodeValue(java.lang.String)|http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/Node.html#setNodeValue(java.lang.String)] ), the function cannot be used on a node that is of type null. What I'm trying to figure out is what to use instead yo be able to set the values of those "null" nodes.
    Edited by: Billy1234 on Jul 3, 2008 6:01 AM

  • Matching opening and closing tags in MXML

    Is possible to match the opening and closing tag in MXML with Flash Builder 4.x?
    In AS3 you can see the curly braces highlighted and you can type Ctrl+Shift+P to jump from one bracket to the other.
    In DreamWeaver you can see the hierarchy for every HTML element, and you  can click any HTML element to highlight the block inside.
    I can see only icons with - and + for contract or expand the MXML blocks, but they are working wrong !

    If you click the element in Outline view, it should highlight the entire tag for you.  Is it not doing this in FB 4?

  • How do I create (or delete) a new tag for a website, so that its tag appears (or does not appear) every time I restart Firefox?

    How do I create (or delete) a new tag for a website, so that its tag appears (or does not appear) every time I restart Firefox?

    See this - https://support.mozilla.org/en-US/kb/How%20to%20set%20the%20home%20page

  • How do I keep the name tags in Picasa Web Albums from appearing on the images by default? With Explorer, name tags only appear when mousing over the image, but with Firefox, all the tags appear on the picture as soon as it is loaded, which looks messy.

    I use Picasa to create web albums, and I tag people who appear in the pictures. With Explorer, the name tags do not appear on the pictures until I mouse over a specific person, at which point the tag appears. With Firefox, the name tags appear as soon as the picture is loaded, and only disappear when you mouse over the people in the picture. This makes the picture look messy; by default, one would want to see a picture without tags all over people's faces.
    The only way to "fix" this is to disable the name tags completely (or tell people to use Explorer!), but this is not an ideal solution, since I would like to be able to share albums with people's names in them.

    I use Picasa to create web albums, and I tag people who appear in the pictures. With Explorer, the name tags do not appear on the pictures until I mouse over a specific person, at which point the tag appears. With Firefox, the name tags appear as soon as the picture is loaded, and only disappear when you mouse over the people in the picture. This makes the picture look messy; by default, one would want to see a picture without tags all over people's faces.
    The only way to "fix" this is to disable the name tags completely (or tell people to use Explorer!), but this is not an ideal solution, since I would like to be able to share albums with people's names in them.

  • How to do closing tag: tag /tag instead of tag/ in jdev xslt mapper

    Hi!
    We have commercial systems, which cannot work with short closing tags for empty nodes.
    Xslt mapper for oracle mediator optimize everytime to short closing tag, when node content is empty.
    Is there a property or technique to achieve long closing tags?
    Kind regards
    Torsten

    http://www.biglist.com/lists/xsl-list/archives/200610/msg00342.html
    not really a pretty solution, but you could try adding the comments

  • Avoid explicit closing tag in XML using graphical mapping

    Hi,
    I created a data type with an element called TAG1 which has an attribute called attr.
    I mapped an empty constant to the element and the value XXX to the attribute.  I`m using graphical mapping and the XML I get is the following:
    <TAG1 attr = u201CXXXu201D></TAG1>
    But for reasons of volume I need to generate the XML without the explicit closing tag, such as:
    <TAG1 value = u201CXXXu201D/>
    Is there any possibility to achieve this with graphical mapping?
    Thanks & Best Regards,
    Viviana

    > But for reasons of volume I need to generate the XML without the explicit closing tag, such as:
    >
    >  <TAG1 value = u201CXXXu201D/>
    >
    > Is there any possibility to achieve this with graphical mapping?
    This is not posible. The graphical mapping always creates start and end tag, even for empty elements.
    You need a seperate mapping step with XSLT or Java mapping.
    Regards
    Stefan

  • How to make an explicit closing tag in XML(e4x).

    I'm working with some XML data and I'm having trouble forcing the way my closing tags are generated.
    I want the long hand form, such as:
    var xmlData:XML =
    <code>
       <codeSnippet>
       </codeSnppet>
    </code>;
    But when I try to insert nodes within the codeSnippet node as child nodes(<snippet />, etc.), and then write to a file, it
    makes the codeSnippet node look like <codeSnippet /> and the <snippet /> nodes are after, which will not work.
    How can I make it NOT treat an empty node as  <codeSnippet /> and explicitly keep it as in long hand form, such as:
    <codeSnippet>
    </codeSnppet>
    Thanks...
    fd

    I figured it out for myself.
    So, does that mean I get the 10 points?
    fd

  • Closing tag in xml transformation

    Hi experts,
    I have the following ABAP code:
    ABAP itab to XML string
      CALL TRANSFORMATION id SOURCE data = ti_stocks[]
                             RESULT XML    ps_output.
    The result in ps_output should be an xml like this
    <?xml version="1.0" encoding="utf-16" ?>
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    <asx:values>
    <DATA>
    <ZTABLE_STO>
      <FIELD1 /> ABC</FIELD1>
      <FIELD2 />0300</FIELD2>
      <FIELD3 />1</FIELD3>
      </ZTABLE_STO>
    etc.
    However, if my internal table ti_stocks contains the field1 with an empty value then the xml is incorrect without its corresponding closing tag:
    <?xml version="1.0" encoding="utf-16" ?>
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    <asx:values>
    <DATA>
    <ZTABLE_STO>
      <FIELD1 />
      <FIELD2 />0300</FIELD2>
      <FIELD3 />1</FIELD3>
      </ZTABLE_STO>
    etc.
    How can I resolve this problem? I would like to have an open tag and a closing tag for every field.
    FIELD1 is a char type field.
    Thank you,
    Oscar
    Edited by: Oscar Arranz on Jan 26, 2012 2:46 PM

    Hello everyone, sorry for my english, I had the same requeriment for the end tag, the simple transformation give this result <xxx/> when the value was empty, and I did something similar to Oscar,
    i did the simple transformation and the result whas and xstring, i used a function to pass it to string, and then I make a replacement.
    here is some code:
    *  Genera XML
       data: xml_xstring          type xstring.
       data: w_xml                 type string.
       data: ixml                    type ref to if_ixml,
               streamfactory      type ref to if_ixml_stream_factory,
               encoding             type ref to if_ixml_encoding,
               ixml_ostream      type ref to if_ixml_ostream.
       data: resstream           type ref to if_ixml_ostream.
    ****Create an instance of the Ixml Processor
       ixml = cl_ixml=>create( ).
    *  ****Create the Stream Factory
       streamfactory = ixml->create_stream_factory( ).
    *  ****Create an Endcoding and Byte Order
       encoding = ixml->create_encoding( character_set = 'ISO-8859-1' byte_order = 0 ).
    *  *  ****Create the output stream with a pointer to our binary string
       ixml_ostream = streamfactory->create_ostream_xstring( xml_xstring ).
    *  ****Set the Encoding into a stream
       ixml_ostream->set_encoding( encoding = encoding ).
    ****Call simple Transformation
       call transformation zdte_libros
       source zcaratula = x_doc
       result xml ixml_ostream.
    *From xstring to string.
       call function 'HR_RU_CONVERT_HEX_TO_STRING'
              exporting
                     xstring = xml_xstring
              importing
                     cstring = w_xml.
    * <xxx/> to <xxx><xxx/>
       replace all occurrences of regex '<([^><\s]+)( [^><]+)?/>' in w_xml with '<$1$2></$1>'.
    Hope it helps someone with the same problem .

  • HTML Tags appear in Notes : how to removing display HTML Correctly.

    Hi the Notes section of HTML CLient for service request, we are seeing HTML Tags appearing in the following format.
    <html><b>Some message/b></html>
    We want to make it appear in HTML format. Not with the HTML Tags. Is there some way to get rid of the HTML Tags ?
    Appreciate you inputs.
    Rgds

    I guess you need to explain your page structure and actions you are doing in a more detailed way. You mentioned a table Jtf_NOTES_B, is it a OAF page or a JSP page ?
    --Shiv                                                                                                                                                                                                                                                                                                                                                               

  • ACE-4710 : XML Syntax Error du to a missing closing tag

    Hi,
    We use XML over HTTPS to gather connections information from a management station. We can successfully read the number of connections per real server (rserver), but the ACE returns a buggy XML code when we tray to get the number of connections through the VIP (by asking the service-policy). The problem is a missing closing tag in the returned code. The missing tag is </sp_class_map>.
    We have the latest ACE software version A3(2.2) installed. Note that the same request on a ACE Service Module does not presents this bug. I took a look in the bug toolkit but did not found the exact match.
    Does somebody already had this problem ? it is anoying as we cannot represent the number of connections for a specific vip in the NMS.
    I attach the returned XML code, in which I highligted the tad that does not have its closing counterpart.
    Thank you for any info before I open a TAC case
    Yves

    Thank you Gilles,
    It seams that this bug is only visible inernally : "Information contained within bug ID CSCsz52234 is only available to Cisco employees".
    I saved the bug to be informed on its status. Do you thing I should open a TAC case anyway ?
    Yves

  • XML closing tags missing throws exception with SAX Parser

    Hey,
    I'm trying to create an XML Document from some HTML.
    I am getting this exception:
    [Fatal Error] :1:334: The element type "input" must be terminated by the matching end-tag "</input>".
    Exception in thread "main" java.lang.RuntimeException: org.xml.sax.SAXParseException: The element type "input" must be terminated by the matching end-tag "</input>".
         at server.XMLUtils.createDocument(XMLUtils.java:76)The xml is like this:
    <html>
    <input name="s" size="5">
    </html>Is there some setting I can change in the parser to make it ignore missing closing tags?
    Here is my current code
         public static Document createDocument(InputStream is) {
              try {
                   Document doc;
                   DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                   DocumentBuilder db = dbf.newDocumentBuilder();
                   doc = db.parse(is);
                   doc.getDocumentElement().normalize();
                   is.close();
                   return doc;
              } catch (Exception e) {
                   throw new RuntimeException(e);
         }Thanks

    Nether wrote:
    Hey,
    The xml is like this:
    <html>
    <input name="s" size="5">
    </html>
    That is not XML. It might qualify as HTML. An XML file would be
    <html>
    <input name="s" size="5"/>
    </html>Winston

  • Create XML element without closing tag using Visual C++

    I know how to create xml element with closing tag (using WriteStartElement and WriteEndElement methods)
    <tag id="1234">
    </tag>
    but is there a way in Visual C++ to produce xml element like this
    <tag id="1234"/>
    i.e. without closing tag?

    Hi adamay,
    Please refer to this thread.
    http://stackoverflow.com/questions/8182245/create-xml-element-without-closing-tag-using-xslt
    I think you could try the way of write your own class derived from XmlWriter.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Third party tag appearance

    I know that Dreamweaver allows me to replace third party tags
    with images in design view. My question is can I make my jsp:widget
    tags appearance dependent on attributes of that tag?
    Something like this <widget:suggestionBox …
    size=”10” />
    Should look like a <input size=”10” /> in
    design view.
    This would be really nice for us developers who want to work
    with designers that don't understand markup and code.

    "rlhosman" <[email protected]> wrote in
    message
    news:gc2lo5$5sc$[email protected]..
    >I know that Dreamweaver allows me to replace third party
    tags with images
    >in
    > design view. My question is can I make my jsp:widget
    tags appearance
    > dependent
    > on attributes of that tag?
    >
    > Something like this <widget:suggestionBox ? size=?10?
    />
    > Should look like a <input size=?10? /> in design
    view.
    This can be done developing "translators". It requires a
    decent understand
    of DW's API and solid JavaScript's skills. You can find more
    info on DW's
    extensibility docs
    Massimo Foti, web-programmer for hire
    Tools for ColdFusion, JavaScript and Dreamweaver:
    http://www.massimocorner.com

  • Dreamweaver bug?: XML closing tag ( _/ ) is flawed.

    This is the original code:
    <_bug>hello</_bug>
    And this is how it's opened by DW (CS4):
    <_bug>hello<_bug>
    Sorry but I can't try it in CS5

    Hello Murray! Thanks for your help. The title of my post is wrong and the underscore it's really an underscore. Just copy-paste the code i wrote, save it as .xml, and then open it with DW. You will see the slash of the closing tag is missing   But if you open it with notepad, for example, you will see the slash again.
    The problem comes when you save the file with DW... Your slash will be deleted forever.

Maybe you are looking for

  • Frustrating time to find the Solution Manager add-on for CPS Scheduling.

    I have spent a couple hours looking through my maintenance optimizer and the software download site.  The problem is that I cannot seem to find the plug in anywhere.  I have found posts pointing to different locations but each one has been a dry hole

  • Unable to create a PO(in backend system) in ECS

    Hello all, I used the FM BBP_PD_SC_CREATE, BBP_PD_SC_UPDATE, BBP_PD_SC_SAVE to create a shopping cart in ECS scenario. The problem is I am unable to create a PO in the backend system for the shopping cart. I am also getting the message 'Vendor 300001

  • Change font size in Firefox 4 and browser windows.

    <blockquote>Locking duplicate thread.<br> Please continue here: [/questions/807389]</blockquote><br> I am a newby. Have never used firefox. The type is too small for me to read. I added an add-on and was able to increase the font size in the menu bar

  • (Read-only file system) ,EXT3-fs error (device sda6) in start_transaction, FOR MY MCS7825I3-K9-CMC1

    I got this problem for my cucm version System version: 7.0.2.20000-5 Product Part Number: MCS7825I3-K9-CMC1 java.io.FileNotFoundException: /var/log/active/platform/log/cli.bin (Read-only file system) log4j:ERROR No output stream or file set for the a

  • ICloud isn't  backed up 2 weeks.

    Hi, I have a seriously problem related iClouds backups. It was started two week ago. When I was open the iPad, is seen one small alert window on the screen. This message says like this; '' iCloud isn't  backed up 2 weeks. Backups, this  iPad when plu