How to select an "attribute" in a forEach statement?

I'm a noob, so I appreciate the help! :)
I'm trying to render text into a table from the node <country> where the attribute is equal to "uk"
Here is my XML code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE lowest-fares [
     <!ELEMENT lowest-fares (country+)>
     <!ELEMENT country (fare+,rules)>
     <!ATTLIST country id ID #REQUIRED>
     <!ELEMENT fare (from,to,price)>
     <!ELEMENT from (#PCDATA)>
     <!ELEMENT to (#PCDATA)>
     <!ELEMENT price (#PCDATA)>
     <!ELEMENT codeshare (#PCDATA)>
]>
<lowest-fares>
     <country id="uk">
          <fare>
               <from>London</from>
               <to>Los Angeles</to>
               <price>900</price>
          </fare>
          <rules>Rules go here.</rule>
     </country>
</lowest-fares>Here's my JSTL code in the page:
  <x:forEach select="$lowestFares//country">
      <tr>
        <td><x:out select="from"/></td>
        <td><x:out select="to"/></td>
        <td><x:out select="price"/></td>
      </tr>
      </x:forEach>I need to specify the "uk" attribute in the country element in the forEach statement, but I'm not sure the proper syntax required to add that in?

Its standard xPath expression syntax: http://www.w3schools.com/xpath/xpath_syntax.asp
Try select="$lowestFares//country[@id='uk']">
I think that should select all countries where the id is 'uk'

Similar Messages

  • How to get these Attribute class in Query Statement ?

    Hi All,
    I have 2 SCCM primary site, the first one is a migrated site from SCCM 2007 to SCCM 2012 SP1 & then upgraded to SCCM 2012 R2, the second one is a newly created SCCM 2012 R2 site.
    I was trying to create a collection membership rule using the query statement on the second site & i found there are attribute classes which were missing on this site.
    Under query rule /edit query rule in the criteria tab i am trying to define a new criteria with Criteria type : Simple value & then i click the select under "Where" for chossing the attribute class & a value called "Winlogon64"
    don't exists there. There are other classes which are missing too.
    then i go to my first site & i can see the classes there, collection query rule are also defined using the attribute classes.
    Now my questions are :-
    1. Does these settings gets migrated from SCCM 2007 to SCCM 2012 on the first site?
    2. How can we get this in SCCM 2012 R2 on the second site?
    Experts please help.
    Thanks,
    Pranay.

    It sounds a lot like you where using an extension on your hardware inventory. Changes to your hardware inventory are not migrated, so you would need to recreate that change in the hardware inventory.
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • How can i select view attribute in a method

    hi how can i select view attribute in method and pass that attribute to procedure
        public void DeleteAgr(Integer agrid) {
                     ViewObject svo = this.findViewObject("AGR");
                     //select current view id from agr and link id with agrid          
                    callPerformSdmsLogon("SMS_FORM_TO_ADf.delete_agr(?)", new Object[] { agrid });
    }Edited by: Tshifhiwa on 2012/06/30 1:01 PM
    Edited by: Tshifhiwa on 2012/06/30 1:22 PM
    Edited by: Tshifhiwa on 2012/06/30 1:24 PM

    hi i use your sample but now am geting this errror (oracle.jbo.JboException) JBO-29000: Unexpected exception caught: java.lang.NullPointerException, msg=null
    ----- Level 1: Detail 0 -----
    (java.lang.NullPointerException) null check the code below
                              public String getCurrentagrid(String currentagrId) {
                            if (currentagrId != null && currentagrId.length() > 0) {
                                ViewObjectImpl agrVO =
                                    this.getAGR1();
                                if (agrVO != null) {
                                    Key key = new Key(new Object[] { currentagrId });
                                    //Searching for the row with key
                                    //getRow(key) will search in the cache which contain atmost
                                    //2000 records Becoz the MaxFetchSize of EmpVO is 2000
                                    AGRRow agrRow =
                                        (AGRRow)agrVO.getRow(key);
                                    //if the record with key is not present in the cache
                                    if (agrRow == null) {
                                        //Searching for the row with key in the DataBase
                                        //findByKey() searches in DB
                                        Row[] agrRows = agrVO.findByKey(key, 1);
                                        if (agrRows != null && agrRows.length != 0) {
                                            //agrRows = (AGRRow)agrRows[0];
                                    if (agrRow  != null) {
                                        //currentagrId = (String)agrRow.getAttribute("id");
                                        //agrVO.executeQuery();
                                        //agrRow = agrVO.first();
                                        callPerformSdmsLogon("SMS_FORM_TO_ADf.delete_agr(?)", new  Object[] { currentagrId });
                            return currentagrId ;
                        }Edited by: Tshifhiwa on 2012/07/01 10:51 AM
    Edited by: Tshifhiwa on 2012/07/01 11:38 AM

  • How to Select Members Based on Attributes using Excel VBA

    Hi there,Does anyone know how to select members based on attributes using Excel VBA?I don't seem to be able to find macros or functions to do that.Panda

    you can use the Range or the Cells objects to get a reference to your range values
    in this sample the data is on A1 to B5
    Dim lineList(4)
    lineList(0) = Array(Cells(1, 1).Value, Cells(1, 2).Value)
    lineList(1) = Array(Cells(2, 1).Value, Cells(2, 2).Value)
    lineList(2) = Array(Cells(3, 1).Value, Cells(3, 2).Value)
    lineList(3) = Array(Cells(4, 1).Value, Cells(4, 2).Value)
    lineList(4) = Array(Cells(5, 1).Value, Cells(5, 2).Value)

  • How to SELECT ALL records of a TABLE VIEW in the BSP page

    Hi All,
    In the BSP portal, I am displaying some data(multple records) in the form of a table using the BSP TAG <htmlb:tableView>. I wrote the logic in the 'VIEW' of the BSP application which will be triggered by the controller. I have used the attribute selectionMode = "MULTISELECT" to have a Check Box to select a row.
    My requirement is to have a button/checkbox on the first column of the header of the table view. By clicking on this, it should select/desect all the records of the table. Could someone please help me how to do this? What attribute I should use in the tableview to get the button in the header row of the table and how to select all the records of the table.?
    Please provide your valuable inputs.
    Thanks & Regards,
    Paddu.

    Select all / Deselect all functionality when onRowSelection is there

  • How to Get Navigational attributes of dso in Report ...

    Hi i have a dso with many fields ,
    In the report i need to get some navgational attributes which are in dso..
    How to Get Navigational attributes of dso in Report ..??
    Thanks All..

    hai naiduz,
    in the dso u find folder with navigational attributes, there select the Navigation check box the fields which u need in the report.
    and further if ur dso through multiprovider and also identify them at multi provider level.
    then u will be able to see the fields at query designer level, then u can use the nav. fields u need in the report.
    regards,
    Vj

  • How to Select a value from DropDownByIndex -Urgent

    Hi All,
    I have dropdownbyindex UI elements in my Views, I get values from BAPI. When click records in a table, It goes to another view to display full record. Here i have dropdownbyIndexes So it should select one of appropriate value in dropdownbyindex based on record(Value) in table.
    Example:
    <u><i><b>In Table View</b></i></u>
    id                  title                 status          priority
    10000      webDynPro            New              Low
    <i><u><b>Detail View:</b></u></i>
    id                   10000
    title                 webDynPro
    Status             New                  [New,Old,Open,Closed]---DropDownbyIndex
    Priority            Low                   [High,Low,Medium]---DropDownByIndex..4m BAPI
    How to select Appropriate Values from DropdownbyIndex. if any one has sample code, that will be helpful.
    Note: I am using Model Nodes
    Thanks and Regards
    Ravi Golla

    Hi Ravi,
    In details view, you will have corresponding context node created for Status and priority dropdown fields.
    Let suppose, context node for Status is, StatusNode.
    value attribute inside this is,
    StatusNode
      |_ StatusAttrib
    Now, you need to write following code to set l_status ="LOW" value in it.
    wdContext.nodeStatusNode().moveFirst();
    for(int i=0; i<wdContext.nodeStatusNode().size(); i++)
        if(wdcontext.currentStatusNodeElement().getStatusAttrib().equals(l_status)
              wdContext.nodeStatusNode().setLeadselection(i);
              break;
    wdContext.nodeStatusNode().moveNext();
    write same code for priority also.
    Let me know if it is not working with you.
    regards,
    Bhavik

  • Select One Choice-select multiple attributes into mutiple columns

    Select One Choice-select multiple attributes into mutiple columns does not work.
    read-only view object view1 - columns a, b, c
    updatable view object view2 - also columns a, b, c
    Select One choice has the capability to bind multiple columns to multiple columns. I understand how this wizard is to be used for these multiple mappings, i.e., view2.a mapped to view1.a, view2.b mapped to view1.b, etc., and using 'select multiple...' for the display attribute. When I complete the 'List Binding Editor" correctly, in this example, only column a will be updated. Columns b,c, etc. will not be effected.
    Has anyone solved this? Please do not reply telling me how to use the editor, I know how, it just is not working.
    Here is my jspx segment,
    <af:selectOneChoice value="#{bindings.Eis000tv1SlOffice.inputValue}"
    label="#{bindings.Eis000tv1SlOffice.label}">
    <f:selectItems value="#{bindings.Eis000tv1SlOffice.items}"/>
    Here is pageDef segment:
    <list id="Eis000tv1SlOffice" IterBinding="Eis000tv1Iterator"
    StaticList="false" ListOperMode="0" ListIter="OfficeSpaceV1Iterator"
    NullValueFlag="1" NullValueId="Eis000tv1SlOffice_null">
    <AttrNames>
    <Item Value="SlOffice"/>
    <Item Value="Floor"/>
    <Item Value="FloorArea"/>
    </AttrNames>
    <ListAttrNames>
    <Item Value="SlOffice"/>
    <Item Value="Floor"/>
    <Item Value="Area"/>
    </ListAttrNames>
    <ListDisplayAttrNames>
    <Item Value="SlOffice"/>
    <Item Value="Floor"/>
    <Item Value="Area"/>
    </ListDisplayAttrNames>
    </list>
    Here is the iterator:

    can u set as specified here
    -Djps.app.credential.overwrite.allowed=true http://radalcove.com/blog/?p=34

  • How To Selectively Preview In Camera Raw?

    I was reading in one of the Photoshop magazines that there was a way to selectively preview attributes in Camera Raw but I can't remember how to do it.
    To be more specific: When you are working in one of the develop tabs ( any of the upper left special tabs) in camera raw and toggle the preview button it only shows you the preview for that specific tab (compared to the original raw file). I want to know how I can preview the original image compared to ALL of the attributes I've changed at once OR only preview the one specific attribute that I've changes compared to the original raw file.
    Does anyone know how to do this? Please advise.
    Regards,
    Rod Klein
    www.rhkuw.com

    Terminology-wise, your description of what you want seems to be off a little, since there's not really an "original raw file" per se.
    There are the settings you started with, i.e., the Camera Raw Defaults (if the raw file has not been opened before) - or - the stored Image Settings for this raw file (if you opened it before).  I'm assuming what you're asking for is a way to see the current entire batch of settings, vs. what you started with.
    When you make control changes, the set of parameters is now considered Custom Settings.
    The way that comes to mind to compare is to click the fly-out menu icon and choose Image Settings (i.e., the settings you started with), or Custom Settings (i.e., your current changes since starting with the image this session).
    -Noel
    P.S., This key summary is often helpful:
    http://help.adobe.com/en_US/photoshop/cs/using/WS982EFD65-8549-4c58-AD7D-0C2C2C39DAF1a.htm l
    Unfortunately, I know of no way to assign keys to menu items in Camera Raw.  That doesn't mean it doesn't exist, just that I don't know of a way.

  • How to access an attribute(this is referencing to another class) in a class

    Dear Gurus,
    I have to read an attribute of a class and that attributes type another class.
    I have intantiated the class and my question is how to read the attribute. I know I can not dirrectly read the attribute since this is another class. I think I have to first reference the attribute right? Please advise me.
    My code looks like below:
    data: lo_fpm                                 type ref to if_fpm.
    data: lo_msg_mgr                        type ref to if_fpm_message_manager.
    data: lo_component_manager    type ref to cl_fpm_component_manager.
    lo_fpm = cl_fpm_factory=>get_instance( ).    " cl_fpm_factory is a class which has a static method get_instance
    lo_msg_mgr = lo_fpm->mo_message_manager.
    lo_component_manager = lo_fpm->mo_component_manager.
    The above statement is giving syntax error. I do not know why.
    The basic difference b/n the two methods is if_fpm~mo_message_manager    type ref to if_fpm_message_manager    and
    mo_component_manager     type ref to cl_fpm_component_manager.
    Any help would be appreciated.
    Thanks,
    GSM

    Hello
    I cannot test the following coding because I do not get the singleton instance yet it should work:
    *& Report  ZUS_SDN_CL_FPM_FACTORY
    *& Thread: How to access an attribute(this is referencing to another class) in a class
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1398429"></a>
    REPORT  zus_sdn_cl_fpm_factory.
    DATA: go_fpm TYPE REF TO cl_fpm.  " class implements if_fpm.
    DATA: go_msg_mgr TYPE REF TO if_fpm_message_manager.
    DATA: go_component_manager TYPE REF TO cl_fpm_component_manager.
    START-OF-SELECTION.
      BREAK-POINT.
      go_fpm ?= cl_fpm_factory=>get_instance( ). " cl_fpm_factory is a class which has a static method get_instance
      CHECK ( go_fpm IS BOUND ).
      go_msg_mgr           = go_fpm->mo_message_manager.
      go_component_manager = go_fpm->mo_component_manager.
    END-OF-SELECTION.
    Regards
      Uwe

  • How to create a attribute for a table

    I am created a table with four columns.
    How to create a attribute for each column.........

    Hi Cranjith Kumar,
    First Create a node for ur table.In that give your table name in the dictionary structure then select option add attributes from the structure that will display the fields there u can select the fields then automatically attributes for ur table will be created in the context.
    Reward points if useful.
    Edited by: srilalitha yerramsetti on Jun 18, 2008 3:23 PM

  • How to select multiple items in ListView?

    Is it possible to select multiple items (rows) in ListView? I'm able
    to select only one item at a time.
    I'm running Forte 30F2 on Windows NT 4.0.
    Thanks in advance,
    Ramarao
    Get Your Private, Free Email at http://www.hotmail.com

    Ramarao,
    I talked to Forte support about this recently and they had nothing but
    bad news.
    They said that you cannot select multiple rows in a listview, and that
    this is a
    feature that will be in the next release ( release 4 ).
    I then asked if it was possible for me to highlight a row manually ( and
    do the multiple
    select myself ), and they said that also wasn't possible. This is due
    to the fact that
    there are no displaynode properties that effect display attributes (
    like font or color ).
    They suggested that I try changing the smallicon to show rows that have
    been 'selected'.
    In other words, when you ctrl-click on any particular row, you could put
    an icon at the
    beginning of a row that shows that this row has been clicked on.
    I'm still working on this myself, so I will keep you posted.
    Jeff Pickett
    From: Ramarao P[SMTP:[email protected]]
    Reply To: Ramarao P
    Sent: Tuesday, March 24, 1998 6:22 PM
    To: [email protected]
    Subject: How to select multiple items in ListView?
    Is it possible to select multiple items (rows) in ListView? I'm able
    to select only one item at a time.
    I'm running Forte 30F2 on Windows NT 4.0.
    Thanks in advance,
    Ramarao
    Get Your Private, Free Email at http://www.hotmail.com

  • How to create an Attribute set

    Hi Everyone,
    i am learning OAF....right now going through PPR.I was referring the sample tutorials where i came across attribute sets in the PPR Example, which i believe were created as per requirement.So not able to proceed further till i get some clue abt how to create an attribute set as per my requirement.Tried to refer dev guide but not able to grab the concept
    Can anyone tell me where exactly do i need attribute sets(i am only aware that it is used to provide the look n feel to the browser) and how to go abt creating one.
    Thanks
    Amrita

    Thanks for replying
    i'd like u to see the PartialPageExample in sampleLibrary project..There is a function being called in the CO from SampleBrowserAM which is
    public void handleSupplierSelectionEvent()
    OADBTransaction txn = getOADBTransaction();
    String detailTableText = null;
    // Find the selected radio button so we can mark the current row.
    OAViewObject vo = (OAViewObject)findViewObject("SuppliersVO1");
    // Get the first filtered row.
    Row masterRow = vo.getFirstFilteredRow ("SelectFlag", "Y");
    if (masterRow != null)
    vo.setCurrentRow(masterRow);
    String supplierName = (String)masterRow.getAttribute("Name");
    MessageToken[] tokens = { new MessageToken("SUPPLIER_NAME", supplierName)};
    detailTableText =
    txn.getMessage("AK", "FWK_TBX_SITES_FOR_SUPPLIER", tokens); }
    else
    // If there are no selected rows, display a default generic message.
    detailTableText =
    txn.getMessage("AK", "FWK_TBX_SUPPLIER_SITES", null);
    // Now set the text message on the DETAIL_TABLE_TEXT attribute in
    // the application properties VO.
    SampleBrowserPVOImpl appPropsVo = getSampleBrowserPVO1();
    Row appPropsRow = appPropsVo.getCurrentRow();
    if (appPropsRow != null)
    appPropsRow.setAttribute("DetailTableText", detailTableText);
    } // end handleSupplierSelectionEvent()
    i am not able to understand the text in bold in the code above.how do i refer to it, where is it stored, what is it doing , and it is maybe specific to the supplier table coz i cannot use it for my custom table...can u pls explain

  • How to validate an attribute in a table/EO using a DB Table

    I have an attribute LocationId in DuplicateLocationEO(LocationId,LocationName)
    And I need a validation on this so that user can enter a LocationId that exists in LOCATION_ID of HR.LOCATIONS table
    How to validate an attribute in a table/EO using a DB Table?

    Issue: Insert a value into an attribute if it is valid, Like it is available in another table.
    Scenario: Insert a Location into a DuplicateLocationEO based on LocationEO.
    Solution: Create a Entity Validator on LocationId of DuplicateLocationEO that is list based on query of LocationEO’s LocationId.
    Note: if the validation is created at attribute level, then it leads to NPE or Undesirable results.
    Procedure Steps:
    Step#01: Open desired Entity Object “DuplicateLocationEO”, Go to “Overview” tab & “Business Rules” finger tab.
    Step#02: Select “Entity Validators” & Click “+”
    Step#03: Set the following Rule Definition Tab:
    •     Select Rule Type as “List”
    •     Attribute “LocationId”
    •     Operator “In”
    •     List Type “Query Result”
    •     Enter SQL Statement “Select LOCATION_ID FROM LOCATIONS”
    Step#04: Now go to “Failure Handling” tab & Select radio button for “Error”.
    Step#05: Click the Magnifier link to create a message.
    Step#06: In the “Select Text Resource” popup. Provide the following
    •     Display Value: “Invalid LocationId: {LocationId}. Please enter a valid Location”
    •     Key: INVALID_LOC
    •     Description: message when user enters an invalid location.
    Step#07: Click “Save and Select” Button
    Step#08: Click “OK” Button
    Reference:
    DuplicateLocationEO DDL Script:
    CREATE TABLE "HR"."TEST_LOC"
    (     "LOCATION_ID" NUMBER NOT NULL ENABLE,
         "LOCATION_NAME" VARCHAR2(50 BYTE) NOT NULL ENABLE,
         CONSTRAINT "TEST_LOC_PK" PRIMARY KEY ("LOCATION_ID")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS" ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS" ;
    To Populate Rows:
    Insert into TEST_LOC select Location_id, city from LOCATIONS

  • How to activate camera attributes in the MAX / LabVIEW

    Hello,
    I have created an icd file for a VieWorks camera. Therefore I used the camera file generator tool of NI. In this tool I can setup camera attributes. After creating the file, I opened the MAX and selected the camera in the IMAQ devices. The attributes I generated where correctly shown. The question now is how to activate the attributes. For instance I created an attribute to activate / deactivate the FAN. When I select the attribute in the MAX and set the value to ON, nothing happens.
    This also fails when I use the SetCameraAttributes.vi in labview. I use LV2009 and IMAQ 4.6.1
    Does anyone have any suggestions?
    Regards,
    Marc Vanmaris

    Hello,
    Just check in MAX that the "Serial Enable" is selected. It seems that the serial command is not send to your camera.
    Hope this helps

Maybe you are looking for