Checking for empty tags using expression builder for XPATH

I am creating several filters in a mediator for several parallel paths. I am trying to route the mediator to the correct DB adapter based on what tags are empty in the incoming XML. The XML has 1 required tag and 3 optional. So for the expression, I am using the expression builder to load the tag name then putting either [text()] or [not(text())] immediately after each tag with an "and" in between for the 3 optional elements. The problem I am having is they always return false. For example, if I enter a value for an optional tag and put [text()] after it, it evaluates to false. What is the correct way to check if an element has text or not?
Thanks in advance!

Hi,
Its not recognizing the getVariableData func... instead try this:
string-length(xpath)>0
ex: string-length($in.body/imp1:manoj/imp1:C1)>0
It works... Happy deploying ... :)

Similar Messages

  • How to use Flash Builder  for Eclipse Luna ( is it possible??)

    How to use Flash Builder  for Eclipse Luna ( is it possible??)

    Yes. I have Flash Builder 4.6 and 4.7 running in different Eclipse Luna installs.
    More details at http://forums.adobe.com/message/4527443
    On Mac, I had to have the 32bit version of Luna for 4.6, and the 64bit version of Luna for 4.7 (and  I recently started using  4.7 with Eclipse Mars).
    For 4.6 you need to first download Eclipse 3.6 and install the Flash Builder 4.6 plugin to that Eclipse install. For 4.7 you need to download Eclipse 3.7 and install the plugin to that Eclipse install. Once it's installed in the 3.x version, you can then copy the fb*.link files from the Eclipse 3.x dropins folders into your Eclipse Luna's dropin folder.
    There is an issue where something in Flash Builder 4.7 won't work right when using it as a plugin, not sure but it might be something with building ANEs.

  • 802.1X for wired environments using Radius/ACS for Dynamic Vlan Assignment

    Currently Being Moderated
    802.1X for wired environments  using Radius/ACS for Dynamic Vlan Assignment
    Could someone please provide me with a simplest set of configuration steps to fire up Radius in ACS and 802.1X for dynamic vlan assignment. The objective is to roll out NAC L2 OOB using the 802.1X method for dymamic vlan assignments.
    If possible show:
    1. ACS/Radius Configurations.
    2. End User Switch Configurations
    Variables:
    Switch A
    MAC Address aaaa.bbbb.cccc     Vlan 10
                bbbb.cccc.dddd     Vlan 20
    Also, if someone posts the Pros and Cons of using Radius/ACS/802.1X for Dynamic Vlan Assignments.
    Other technology sets that can be used for Dynamic Vlan assignment EXCEPT from deprecated/obsolete VMPS.
    Thanks in advance. .

    Hi Guys,
        Hmmm, well if your just looking for Mac based authentication the good news is that is very easy.  Just set create your Radius server, ACS, FreeRadius, Steelbelted radius etc.  Then create user with the name of the Mac address, in other words if the mac address is 0012.0021.1122 the the name would be 001200211122 and the password would be the mac address.  Then you set the vlan and tunnel stuff, like so tunnel-Type would be vlan, Tunnel-medium would be 802 and Tunnel-Private-Group-ID is the name of the vlan(not the vlan number)
       So for the Cisco ACS 4.x you would create a user as specified above, fill in all the password boxes with MAC address, I believe the mac has to be all lower case in the name and the password.  Then check the Separate(Chap/MS-Chap/ARAP) box.  Then you pick the group the machine belongs to, the group is the part that defines what vlan it is on.
       Before you create the user, create the group with info I wrote above and in addition specify the Service-Type as Authenticate Only.
        Freeradius is a bit harder to configure the specifics and I am just now testing a freeradius server so I do not know the process for Machine authentication.
        If, however, you are trying to authenticate a user that gets a bit trickier and is not so straight forward.

  • I am setting up a Numbers table for gas milage using one column for gallons divided by the next column of miles and having the answer in the third column in miles per gallon.

    I am setting up a Numbers table for gas milage using one column for miles and the next column for gallons, the two to be divided to produce the third column of miles per gallon and am unable to find out how to do that.  Add and/or subtract, yes, but not to divide.

    ...and results in yield signs indicating an error:
    Hi Wayne,
    Yield signs must be different in Texas. Here (and in much of the rest of the world) they're white with a red border, and installed with an apex pointing down:
    Some still include the word "Yield" (or in Quebec, "Cedez"in black letters.
    Maybe you're thinking of the "Warning triangle", which is similar, but installed base down, and often including a symbol in the white space:
    These are more common in Europe, with the exception of the portable version, which I've seen used at road construction sites or as 'flares' to warn of a disabled vehicle on the road.
    Or maybe you were thinking of this
    (Most of these 'slow moving vehicle' triangles have an orange center. This one looked a bit more 'Texas,' though.)
    Cheers,
    Barry

  • 11g TP3 [ER] Offline database / Expression builder for naming conventions

    I would be nice to have a way to define some project specific standards for name generated automatically by jdev.
    In big projects its really not fun to update each foreign key and foreign key attributes to be conform to some standards.
    Why not using an expression builder with regular expression to build the standard form of name generated by JDev and set the expression in the project properties.

    I am able to fix this issue. After a series of R & D I was able to find that the root cause is %APPDATA%\jdeveloper. Deleting the relevant directory will solve this issue. In fact, I tried to delete the entire jdeveloper directory under %APPDATA% and the jdev 11.1.1.7 form generation issue got resolved. Those who find "referential integrity" issue may follow this approach.
    This solution also applies to this thread
    Auto Generate task Form

  • Query for recurring reports using Query Builder in Business objects

    1. How to count webi Recurring reports using query builder in business objects? (Need Query for this)
    2. How to count Crystal Recurring reports using query builder in business objects? (Need Query for this)
    I am able to get summerized recurring reports using Query Builder.
    For Example we have 343 reports which are under recurring (This includes both Webi Reports and Crystal Reports).
    we need to get individually how many webi reports are under Recurring and Crystal reports are under Recurring.

    1. How to count webi Recurring reports using query builder in business objects? (Need Query for this)
    2. How to count Crystal Recurring reports using query builder in business objects? (Need Query for this)
    I am able to get summerized recurring reports using Query Builder.
    For Example we have 343 reports which are under recurring (This includes both Webi Reports and Crystal Reports).
    we need to get individually how many webi reports are under Recurring and Crystal reports are under Recurring.

  • How can I use flash builder for php?

    Hello! I saw a flash banner maker website http://ideal-banners.com/. My question that how can I use a flash builder for php?

    Hi Michael,
    Thanks for your two helpful replies.  The article by V. Brossier looks very useful, and I managed to use SDK 3.3 with FB.  But I had misdiagnosed my problem.  The problem was that the compiler was targetting Flash Player 9 instead of 10.  I've managed to fix that.
    Thanks again,
    Francisco

  • How to insert a Chart using Template Builder for Word 2007

    Hello,
    I am trying to insert a chart in my report, but the OK button in the Chart dialog box is disabled. I am able to move the data but OK button would never become available.
    Does anybody knows what happend?
    I' using BI Publisher 10.1.3.4 and Word 2007
    Any help would be really appreciated :)
    Regards,
    Blanca

    Hi,
    Probably this will help you.
    Uninstall the template builder for word and restart you system and re-install it.
    Because this is add in component in MS Word.So some times this installation is not perfect.Try it once.
    I hope this will work

  • Validate empty tags using xquery

    Hi All,
    I have a question regarding xquery flwor exrpession. My scenarion is I need to validate an xml input file wether one of its elements is empty so I created an xquery to validate. However, I receive an error when I try to make an input file that has a repeating element.
    Below is my xquery for validating empty tags:
    declare namespace cred="http://www.pldt.com.ph/eai/service/component/CreditService/";
    declare namespace com="http://www.pldt.com.ph/eai/Common";
    declare variable $inputdata as element(cred:PushQuote) external;
    let $QuoteNumber := data($inputdata/PushQuote/com:QuoteNumber)
    let $AccountNumber := data($inputdata/PushQuote/com:CustomerAccountNumber)
    let $QuoteLineItemList := $inputdata/PushQuote/com:LineItemList
    for $data in $inputdata
    return
    if (fn:string-length($QuoteNumber) > 0 and
    fn:string-length($AccountNumber) > 0)
    then
    for $quoteLineItem in $QuoteLineItemList
    return
    if (fn:string-length(data($quoteLineItem/com:QuoteLineItem/com:LineNumber)) > 0 and
    fn:string-length(data($quoteLineItem/com:QuoteLineItem/com:ProductCatalogId)) > 0 and
    fn:string-length(data($quoteLineItem/com:QuoteLineItem/com:Product)) > 0 and
    fn:string-length(data($quoteLineItem/com:QuoteLineItem/com:Quantity)) > 0 and
    fn:string-length(data($quoteLineItem/com:QuoteLineItem/com:Mrc)) > 0 and
    fn:string-length(data($quoteLineItem/com:QuoteLineItem/com:Currency)) > 0 and
    fn:string-length(data($quoteLineItem/com:QuoteLineItem/com:LastUpdateDate)) > 0 and
    fn:string-length(data($quoteLineItem/com:QuoteLineItem/com:LastUpdatedBy)))
    then
    "0"
    else
    "1"
    else
    "1"
    Below is my input xml document:
    <cred:PushQuote xmlns:com="http://www.pldt.com.ph/eai/Common" xmlns:cred="http://www.pldt.com.ph/eai/service/component/CreditService/">
    <PushQuote>
    <com:QuoteNumber>ZXCV-233</com:QuoteNumber>
    <com:CustomerAccountNumber>1213654889</com:CustomerAccountNumber>
    <!--Optional:-->
    <com:LineItemList>
    *<!--1 or more repetitions:-->*
    <com:QuoteLineItem>
    <com:LineNumber>3</com:LineNumber>
    <com:ProductCatalogId>string</com:ProductCatalogId>
    <com:Product>asdf</com:Product>
    <com:Quantity>string</com:Quantity>
    <com:Mrc>3</com:Mrc>
    <com:Currency>USD</com:Currency>
    <com:LastUpdateDate>string</com:LastUpdateDate>
    <com:LastUpdatedBy>string</com:LastUpdatedBy>
    </com:QuoteLineItem>
    <com:QuoteLineItem>
    <com:LineNumber>3</com:LineNumber>
    <com:ProductCatalogId>string</com:ProductCatalogId>
    <com:Product>1234</com:Product>
    <com:Quantity>string</com:Quantity>
    <com:Mrc>3</com:Mrc>
    <com:Currency>USD</com:Currency>
    <com:LastUpdateDate>string</com:LastUpdateDate>
    <com:LastUpdatedBy>string</com:LastUpdatedBy>
    </com:QuoteLineItem>
    <com:QuoteLineItem>
    <com:LineNumber>3</com:LineNumber>
    <com:ProductCatalogId>string</com:ProductCatalogId>
    <com:Product></com:Product>
    <com:Quantity>string</com:Quantity>
    <com:Mrc>3</com:Mrc>
    <com:Currency>USD</com:Currency>
    <com:LastUpdateDate>string</com:LastUpdateDate>
    <com:LastUpdatedBy>string</com:LastUpdatedBy>
    </com:QuoteLineItem>          
    </com:LineItemList>
    </PushQuote>
    </cred:PushQuote>

    atheek1 wrote:
    Try this:
    <ResultDoc>
    for data in $inputData/PushQuote
    return
    if( put all your if conditions here) then
    <result> 1</result>
    else
    <result>0</result>
    </ResultDoc>
    This will return a xml :
    <ResultDoc>
    <result>1</result> <!.. one result per PushQuote in input !>
    <result>0</result>
    </ResultDoc>yup I've tried that, and now I'm able to get result, my problem now is I can't get the result that is equal to 1 even if I use xpath.
    please see my updated code:
    declare namespace cred="http://www.pldt.com.ph/eai/service/component/CreditService/";
    declare namespace com="http://www.pldt.com.ph/eai/Common";
    declare function local:CheckValidation($PushQuote as element(cred:PushQuote))
    let $QuoteNumber := data($PushQuote/PushQuote/com:QuoteNumber)
    let $AccountNumber := data($PushQuote/PushQuote/com:CustomerAccountNumber)
    let $QuoteLineItemList := $PushQuote/PushQuote/com:LineItemList/com:QuoteLineItem
    return
    <status>
    for $QuoteLineItem in $QuoteLineItemList
    return
    if (fn:string-length(data($QuoteNumber)) > 0 and
    fn:string-length(data($AccountNumber)) > 0 and
    fn:string-length(data($QuoteLineItem/com:Quantity)) > 0 and
    fn:string-length(data($QuoteLineItem/com:Product)) > 0 and
    fn:string-length(data($QuoteLineItem/com:Mrc)) > 0 and
    fn:string-length(data($QuoteLineItem/com:Currency)) > 0 and
    fn:string-length(data($QuoteLineItem/com:LastUpdateDate)) > 0 and
    fn:string-length(data($QuoteLineItem/com:LastUpdatedBy)) > 0)
    then
    <code>0</code>
    else
    <code>1</code>
    </status>
    declare variable $PushQuote as element(cred:PushQuote) external;
    let $returnValue := local:CheckValidation($PushQuote)
    return
    $returnValue
    $returnValue[code=1]/code
    I've tried putting xpath like this to get result = 1 but no luck :)

  • Using expression builder

    hi,
    how can i use where condition at expression builder at admin tool, can you share sytax please?

    Hi,
    Whenever you click on the expression builder the syntax will be shown to you as soon as you click on the functions or any object you select.
    In the logical table source, content tab, where clause, whatever condition you specify it gets reflected in the query when ever you pull the columns from the table.
    For example-
    If you are specifing the condition as
    Region_name='Asia'
    Then when ever you pull the columns from the table then the data will get restricted with 'Asia' data only.
    You can als call functions, session variables.
    Hope this helped/ answered.
    Regards
    MuRam

  • How to generate empty tag using XMLForest

    Hi,
    I am creating an XML document using XMLAgg, XMLForest and XMlElement functions.
    At some point I have an XMLForest embedded in the other XMLForest
    XMLForest( e.indicator as "col1",
               e.participant_id as "col2",
      XMLForest( tableAlias.col11 as "address1",
                 tableAlias.col12 as "address2",            
               ) as "items",
    )           and within the last one I have some expressions which are empty, so the XML tags are not generated, however I have to have an empty tags:
    <address2></address2>I tried to replace an expression using "NVL" or "DECODE", but the results were the same.
    I also tried to replace an embedded XMLForest with an XMLElement :
    XMLForest( e.indicator as "col1",
               e.participant_id as "col2",
      *XMLElement("items"*
                 *XMLElement("address1"),*
                 *XMLElement("address2")*
               *) as "items",*)           however it created 2 <items> tags :
        <items>
             <items>
                <address1>value</address1>
                <address2></address2>
             </items>
         </items> I am working with Oracle 11.2.0 db.
    Is there any way to generate an empty tag when using XMLForest function?
    thank you in advance.
    Edited by: user624274 on Apr 3, 2013 8:52 AM
    Edited by: user624274 on Apr 3, 2013 8:53 AM

    Hello Odie_63.
    Your argument is valid, but it does not mean the solution I provided is bad.
    If you are concerned about the size of the result, it is simple, you can use like:
    REPLACE(XMLForest( NVL(e.indicator, '#NULLValue#') as "col1",  NVL(e.participant_id, '#NULLValue#') as "col2").getClobVal(), '#NULLValue#', '')
    According to Oracle documentation, REPLACE is smart and will return a CLOB (not a varchar2) because it changes the type of return according to the type of the first parameter. So you will not have issues with size.
    I believe the first question was related to use the final result to record to a table or send to another system (to use as integration). If it will be used just in a select field, it does not matter if it is not there or if it is there as NULL, the select of the field will always return ''.
    Other hint, I never use xmltype to store on database, because it is not compatible with other databases or integration tools. I use CLOB because it is the natural serialization of the object and I can convert and work with it inside and outside Oracle.
    But that is up to the architect and/or developer. If the system is running only on Oracle and there is no integration, maybe xmltype will save a lot of time in conversions.
    Regards.
    Rodolpho

  • As the cronos MM(Multiple Master) is discontinued by Adobe and there is only pro version on sale .If i can purchase mm version through adobe ? or If it is free for us to use ,no matter for commercial or uncommercial use?

    We have a branding project for a college. we decided to use the cronos MM font as our major font .i searched from internet that there is only cornos pro on sale .but what we want is cornos MM,all the message that i got from the internet is that the Cronos MM is free for download. Is it free for a university to use it ?  or we have to buy it ?if we have to buy ,could you tell me if i can buy that font,cornos MM from adobe ,as it is discontinued by adobe?

    Addressing the first of your questions, no, Adobe no longer licenses any of its type library in Multiple Master format. Although Type 1 Multiple Master technology was a very promising technology over 20 years ago, it was never particularly popular with our customers nor was it supported well or at all by other applications and operating systems. Thus, that format was discontinued. Some Adobe applications continue to support Multiple Master technology, but the ability to create and use custom instances of such fonts is not available.
    When Adobe re-released its type library in OpenType CFF format, for all the previous Multiple Master typeface families, all the predefined instances of the Multiple Master fonts were issued as individual typefaces. Since very few users ever used custom instances, this had minimal effect.
    Thus, if you are interested in the Cronos type family, the Cronos Pro OpenType CFF fonts should meet your needs, especially since it supports many more typographical features than the original Multiple Master version. Is there anything that you think is missing from Cronos Pro?
    With regards to your second question with regards to Cronos MM being free to download, just because you found something on the internet doesn't mean that it is true. Adobe has never released Cronos MM as a “free to download” product. If anyone is posting copies of the old Cronos MM fonts for “free download,” they are doing so illegally.
              - Dov

  • Can't retrieve username using expression builder on a run time data control

    Here's the scenario:
    1. I added a Data Control resource in WebCenter Spaces, which has one paramater to get: username.
    2. I added the Data Control in Oracle Composer, and selected the return method to show as a read only form.
    3. In adding the Return method, under DC Parameters I have to get the username and place it on my parameter, ie: arg0 = username. arg0 is my data control parameter.
    I tried using every possible code there is in the Expression Editor to retrieve the username, but I keep getting null when I test it. I've tried *#{securityContext.userName}*, *#{webCenterProfile[securityContext.userName].userName}*. I also tried creating a page parameter, and use it like this: *#{bindings.myUsername}*, but still won't work. Its always null.
    How do I retrieve the username and bind it to the parameter of my data control using expression editor? Please help. Thanks.
    Edited by: aeriaL18 on Aug 13, 2012 12:15 PM

    Hi ,
    I believe this should be posted to Webcenter Portal forum : WebCenter Portal
    Thanks
    Srinath

  • Using Expression Web for editing master pages

    I have SP Foundation 2013 and I am trying to edit a master page in Expression web since SP Designer no longer has design view. Reading the documentation it says that any HTML tools such as dreamweaver, Expression Web etc can be used.
    I have mapped a drive to the Master Page Gallery and made a copy of the master page I am trying to edit.
    When I open it up in Expression Web I get the following error:
    Error creating Control - SPHtmlTag
    Unknown Server Tag Sharepoint:SPHtmlTag
    Can anyone help? I'm by far no web developer or Sharepoint Developer and I just want to make some simple changes to the master page such as adding a footer with some links/images etc so it displays on all pages within the site, which is just a basic intranet
    site for a small company.
    Any help would be appreciated, thanks.

    you use HTML tools such as dreamweaver to desgin the .html file associated with the .master file:
    http://blogs.technet.com/b/speschka/archive/2012/07/27/using-dreamweaver-and-design-manager-with-sharepoint-2013.aspx
    GuYuming
    TechNet Community Support

  • Urgent help needed for XML Tags using XMLForest()

    Folks
    I need some urgent help regarding getting use defined tag in your
    XML output.
    For this I am using XMLElement and XMLForest which seems to work fine
    when used at the SQL prompt but when used in a procedure throws and error
    SQL> Select SYS_XMLAGG(XMLElement("SDI",
                                       XMLForest(sdi_num)))
         From sdi
         where sdi_num = 22261;- WORKS FINE
    But when used in a procedure,doesnt seem to work
    Declare
        queryCtx  DBMS_XMLQuery.ctxType;
        v_xml     VARCHAR2(32767);
        v_xmlClob CLOB;
        BEGIN
        v_xml:='Select SYS_XMLAGG(XMLElement("SDI",
                                             XMLFOREST(sdi_num)))
        From sdi
        where sdi_num = 22261';
        queryCtx :=DBMS_XMLQuery.newContext(v_xml);
        v_xmlClob :=DBMS_XMLQuery.getXML(queryCtx);
        display_xml(v_xmlClob);
    End;
    CREATE OR REPLACE PROCEDURE  display_xml(result IN OUT NOCOPY CLOB)
    AS
         xmlstr varchar2(32767);
         line varchar2(2000);
    BEGIN
         xmlstr:=dbms_lob.SUBSTR(result,32767);
         LOOP
         EXIT WHEN xmlstr is null;
         line :=substr(xmlstr,1,instr(xmlstr,chr(10))-1);
         dbms_output.put_line('.'||line);
         xmlstr := substr(xmlstr,instr(xmlstr,chr(10))+1);
         END LOOP;
    end;
    SQL> /
    .<?xml version = '1.0'?>
    .<ERROR>oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an
    XML tag name.</ERROR>
    PL/SQL procedure successfully completed.
    SQL>HELP is appreciated as to where I am going wrong?

    Hi,
    if you want to transform something to something else, you should declare, what is your source.
    I would prefer to use plain XSL-Transformations, because you have a lot more options to transform your source and you can even better determine, how your output should looks like.
    Kind regards,
    Hendrik

Maybe you are looking for