Change a attribute value with XSLT before importing an XML

I need change the attribute value with XSLT before importing an XML
<table class="x" style="width="50pt">...
I have to divide by 200 the value of "width", and the result multiplied by 100:
(50/200) * 100
It's possible with a XLST?

Hi,
Yes you can do this via XSLT.
You can try similar to the one below:
<table>
   <xsl:attribute name="width">
     <xsl:value-of select="((./width) div 200)*(100)" />
   </xsl:attribute>
</table>
I have not tested yet... Try it....
Green4ever
(I am back after long time)....

Similar Messages

  • Change the attribute "src" to "href" before importing an XML

    I need to change the attribute "src" to "href" (<img scr="....">) before importing an XML document. I think you could do with XSLT, so you can add a script to import XML documents. But I do not know much about XSLT ...
    Does anyone could give me an idea?
    Thanks in advance...!!!

    Piece of cake. Here is an identity transform, except that it filters out "src" attributes:
    <?xml version="1.0" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" >
    <xsl:template match="node()|@*">
      <xsl:copy>
        <xsl:apply-templates select="node()|@*"/>
      </xsl:copy>
    </xsl:template>
    <xsl:template match="@src">
      <xsl:attribute name="href">
          <xsl:value-of select="."/>
       </xsl:attribute>
    </xsl:template>
    </xsl:stylesheet>
    See http://stackoverflow.com/questions/2679443/how-do-i-rename-an-attribute-using-xslt

  • Error in changing row attribute value

    Hi,
    I am using JDeveloper 11.1.1.4 and developing a project using ADF-BC.
    In my application,I am displaying an adf table from DataControl->view object.
    The view object is based on an entity object which has composite primary key [Ex: Name and Rank]
    I have an requirement to swap selected row and its previous row's rank values on click of a button.
    I have written following code to achieve this.
    public void swapRows(ActionEvent actionEvent) {
    ViewObject rscMapVo = getRscMapViewObj();
    Row currRow = rscMapVo.getCurrentRow(); //------------->Current Row
    int currRowIndex = rscMapVo.getRangeIndexOf(currRow);
    Row prevRow = getRscMapVoIter().getRowSetIterator().getRowAtRangeIndex(currRowIndex - 1); // ------------> Previous Row
    Long currRowRank = ((Number)currRow.getAttribute("Rank")).longValue();
    Long prevRowRank = ((Number)prevRow.getAttribute("Rank")).longValue();
    //Actual Swapping
    prevRow.setAttribute("Rank", new Number(currRowRank));
    currRow.setAttribute("Rank", new Number(prevRowRank));
    adfFacesContext.addPartialTarget(tblRSCMap);
    }//End of method
    This is giving me the exception
    1)Rank     Too many objects match the primary key oracle.jbo.Key[Group_1 7 ]. [Name is Group_1 and Rank is 7]
    2)Rank     Too many objects match the primary key oracle.jbo.Key[Group_1 8 ] .[Name is Group_1 and Rank is 8]
    If instead of actual rank values I update it to some random number it updates properly. i.e for example prevRow.setAttribute("Rank", new Number(900)); and currRow.setAttribute("Rank", new Number(800));
    The exception occurs when I change one row value with a value that is already present in other row there by giving unique constraint problem.
    How to overcome this problem??
    Is there any other way of implemeting this solution.
    I want the changed attribute values to commit to DB only after final commit but not immediately.
    Please advice/suggest.
    Thanks,
    Praveen

    Hi RajGopal,
    Even in the model layer it gives the same error.
    steps done
    1.Create an attribute in entity and set its value
    2.Override the method doDML in EntityImpl
    protected void doDML(int operation, TransactionEvent e) {
    try{     
    if(this.getTestRank() != null){
    this.setRank(this.getTestRank());
    }else{
    System.out.println("Test rank null");
    super.doDML(operation, e);
    }catch(Exception excep){
    System.out.println("Eceptin in update");
    excep.printStackTrace();
    Exception
    oracle.jbo.TooManyObjectsException: JBO-25013: Too many objects match the primary key oracle.jbo.Key[Group_1 28 ].
         at oracle.jbo.server.EntityCache.throwTooManyObjectsException(EntityCache.java:588)
         at oracle.jbo.server.EntityCache.handleDuplicateKey(EntityCache.java:596)
         at oracle.jbo.server.EntityCache.addForAltKey(EntityCache.java:990)
         at oracle.jbo.server.EntityCache.replaceForAltKey(EntityCache.java:1739)
         at oracle.jbo.server.EntityImpl.setAttributeValueInternal(EntityImpl.java:3952)
    Thanks,
    Praveen

  • Clearning attribute values with amadmin

    How can I clear an attribute value with amadmin?
    In particular, I am trying to using ModifyServiceTemplate within OrganizationRequests to clear the bind dn for the ldap authentication module.
    I have tried "<Value></Value>", "<Value/>", and just leaving out the value element. The first two attempts cause the amadmin command to complain when it sends the request to the server. Leaving the value element out causes the document to not be valid according to the dtd so amadmin will not even process it.
    <Requests>
    <OrganizationRequests DN="o=mitre.org,o=isp">
    <ModifyServiceTemplate serviceName="iPlanetAMAuthLDAPService"
    schemaType="Dynamic">
    <AttributeValuePair>
    <Attribute name="iplanet-am-auth-ldap-bind-dn"/>
    <Value> </Value>
    </AttributeValuePair>
    </ModifyServiceTemplate>
    </OrganizationRequets>
    </Requests>

    I think you should use DeleteServiceTemplate:
    <OrganizationRequests DN="o=sun.com,o=isp">
    <DeleteServiceTemplate serviceName="iPlanetAMAuthLDAPService" schemaType="Dynamic"/>
    </OrganizationRequests>
    </Requests>
    If you want to keep the service template but you don't want a value for "iplanet-am-auth-ldap-bind-dn" maybe you can use <Value="">. I don't know for sure, but that would be just like if don't want to show the helptext for a channel.

  • Selcect/ update attribute value using xpath navigator/ linq to xml

    Hi Folks,
    below is my xml string and the highlighted bold attribute value needs to update. Since this element contains prefix im not able to select teh particular element. if i remove the prefixx im able to select but i need to keep prefix.
        <IOP:MtvnSvcReq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:IOP="mtvnCWExternInteropReq" xmlns:IOP1="mtvnExtInteropReqData" xmlns:PR1="mtvnPRInteropReqData">
                              <IOP:Svc>
                                                 <IOP1:PR1>
                                                       <PR1:PRExternSSOReqData>
    <PR1:UserId>abcd</PR1:UserId>
                                                       </PR1:PRExternSSOReqData>
                                                 </IOP1:PR1>
                                </IOP:Svc>
                        </IOP:MtvnSvcReq>
    Thanks 

    Hi Pulikk,
    Do you mean you want  to change the attribute value(abcd)? If so,
    Please try the following code, i tested on my side, it changed successfully.
    //Here is the variable with which you assign a new value
    string newValue = string.Empty;
    XDocument objDoc = XDocument.Load(@"yourdata.xml");
    XNamespace IOP = "mtvnCWExternInteropReq";
    XNamespace IOP1 = "mtvnExtInteropReqData";
    XNamespace PR1 = "mtvnPRInteropReqData";
    foreach (var node in objDoc.Descendants(PR1 + "UserId"))
    node.Value = newValue;
    objDoc.Save(@"yourdata.xml");
    Have a nice day!
    Kristin
    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.

  • Apply XSLT  while importing the xml to the selected node in structure view

    Hi All,
    I would like to apply XSLT while importing the xml file to the selected node in the structure view.
    How to go about it?
    Thanks
    Sakthi

    Hi All,
       Got the solution,
                    UIDRef documentUIDRef = ::GetUIDRef(activeContext->GetContextDocument());
                InterfacePtr<IDocument> document(documentUIDRef, UseDefaultIID());
                InterfacePtr<IXMLImportOptionsPool> prefsPool( document->GetDocWorkSpace(), UseDefaultIID() );
                InterfacePtr<IK2ServiceRegistry> serviceRegistry(gSession, UseDefaultIID());
                InterfacePtr<IK2ServiceProvider> serviceProvider(serviceRegistry->QueryServiceProviderByClassID(kXMLImportMatchMakerSignal Service,     kXMLThrowAwayUnmatchedRightMatchMakerServiceBoss));
                InterfacePtr<IXMLImportPreferences> prefs(serviceProvider, IID_IXMLIMPORTPREFERENCES);
                XMLImportPreferencesInitializer initializer(prefs, prefsPool);
                bool16 prefBool = prefs->GetNthPrefAsBool(0);
                prefs->SetNthPref(0, kTrue);
    The above code set the import option "Delete elements, frames, and content that do not match imported XML"
    Thanks
    Sakthi

  • Change an attribute value in the last level of a tree

    Hi,
    I'm using jdev 11.1.1.0.1
    I have a tree composed of 5 VO. Each VO represent a level of the tree. I made an "executeWithParam" in my VO level 1 to pass some parameters.
    I would like to make a "setAttribute" on my VO level 5. I'm working with a tree, so i can't do : "getMyVo.getCurrentRow.setAttribute..."
    How can i do?
    ideas :
    - Today, i use bind variable to pass parameters from first level VO to last level VO : can i put the bind variable value in an attribute value?
    - Is there a method to override in the viewRowImpl.java to catch the "setAttributeInternal" made by ADF? so i could change the value of this attribute
    - Is there a method to override in the viewImpl.java which can help me?
    I try a lot of think without success... hope someone can help me
    Thanks in advance
    Clément

    Hi Frank,
    Thanks for your help.
    My need is to initialize all the rows of my VO level 5. Not only the selected ones. But i keep your solution for later :)
    Today, that is what i'm doing :
    - First, i use "executeWithParam" to complete a bind parameter of the first VO.
        public void executeWithParamTreeNiv1() {
            VoLvl1ViewImpl view =
                (VoLvl1ViewImpl) getLvl1View ();
            VoSourceId rowSrc =
                (VoSourceIdRowImpl) getVoSourceIdView().getCurrentRow();
            if (rowSrc != null) {
                saisPrevTreeView.setFkId(rowSrc.getId());
        }- Then, i use the method "createViewLinkAccessorRS" of the viewImpl, to pass bindParmeters between VOs.
            protected ViewRowSetImpl createViewLinkAccessorRS(AssociationDefImpl assocDef, ViewObjectImpl accessorVO,
                                                          Row masterRow, Object[] values) {
            ViewRowSetImpl v = super.createViewLinkAccessorRS(assocDef, accessorVO, masterRow, values);
            Number fkId = (Number)((ViewRowImpl)masterRow).getViewObject().getNamedWhereClauseParam("FkId");
            accessorVO.setNamedWhereClauseParam("FkId", fkId );
            v.setNamedWhereClauseParam("FkId", fkId );- Finally, i use the method "isAttributeUpdateable" of my VO level 5, to get the bind parameter and make a setAttribute.
        @Override
        public boolean isAttributeUpdateable(int i) {
            Number fkId= (Number)this.getViewObject().getNamedWhereClauseParam("FkId");
            if (fkId!= null) {
                this.setFkId(fkId);
        }What do you think about this method?
    Thanks
    Clément

  • .change IUCONFIG attribute value in an event-handler of IUICCON (move in)

    Hi there,
    I have been searching for over a week now both on SDN and using the debugger, hopefully this brings more luck.
    On the web-client there is this new contracts page with 3 tabs.
    On the first tab you can choose a product, select a contract and then click Configuration.
    There you can change parameters. (this is View IUCONFIG/ConfigTree) with contextnode ISUORDERITEMCONFIG.
    In this case it is not wanted that this configuration page needs to be opened.
    So I need to change the value of 1 of these attributes (always the same attribute) automatically when switching to the 2nd tab, or when clicking the save button on the last tab. Or any event on the 2nd or 3rd tab are okay. As long as they are sure to be executed in the process.
    I would prefer changing the attribute from within IUICCON/ProcessSaveButtonBar>EH_ONBT_SAVE_PROCESS
    or IUICCON/ProcessBar>EH_ONNAVTOACCOUNTDATA
    I just don't have a clue how to automatically set one value of these configuration attributes.
    Can anybody provide a solution or a workaround?
    Is there any way to change the parameters without ever going to the configuration page in the browser?
    Thanks in advance for your ideas
    Could this thread be moved to CRM webclient?

    Solved, the solution can be supplied in trade for the right amount of money
    (okay is was CRM_ISU_CONT_CHANGE_OW)

  • Bug report: oracle.jbo.ViewCriteriaRow: string attribute value with '

    Setting a ViewCriteriaRow attribute to a string value with an ' (apostrophe) causes an exception. Example:
    ViewCriteriaRow vcr;
    vcr.setAttributeValue ("Nachname", "D'Heur");
    this should match with the Nachname column exactly with D'Heur, but the BC4J-SQL-Generator generates an SQL statement with "Nachname like 'D'Heur'" in the where clause. Using bind variables like "Nachname like :1" would help. Here the sample exception (BC4J in Jdev 9.0.3.4):
    Error Message: JBO-27122: SQL-Fehler bei Vorbereitung der Anweisung. Anweisung: SELECT PsBenutzer.BER_ID, PsBenutzer.ATP_ATP_ID, PsBenutzer.QTP_QTP_ID, PsBenutzer.BDP_BDP_ID, PsBenutzer.LND_LND_ID, PsBenutzer.ANREDE, PsBenutzer.TRENDSHOPID, PsBenutzer.VORNAME, PsBenutzer.NACHNAME, PsBenutzer.BENUTZERKENNUNG, PsBenutzer.PASSWORT, NULL AS PASSWORTWIEDERHOLUNG, PsBenutzer.STATUS, PsBenutzer.INAKTIVBIS, PsBenutzer.GEBURTSDATUM, PsBenutzer.EMAIL, PsBenutzer.MOBIL, PsBenutzer.BEVORZUGTEADRESSE, PsBenutzer.INBRANCHESEIT, PsBenutzer.WUNSCHPRAEMIE, PsBenutzer.HOBBYS, PsBenutzer.SACHBEARBEITERKUERZEL, PsBenutzer.STRASSE, PsBenutzer.PLZ, PsBenutzer.ORT, PsBenutzer.TELEFON, PsBenutzer.FAX, PsBenutzer.UEBERTRAGVERFUEGBAREPUNKTE, PsBenutzer.ERVVERKAUFSEIT, PsAgenturzuordnungen.AZG_ID, PsAgenturzuordnungen.ARE_ARE_ID, PsAgenturzuordnungen.AGT_HAGTNR, PsAgenturzuordnungen.AGT_NAGTNR, PsAgenturzuordnungen.BER_BER_ID, PsAgenturzuordnungen.TELEFON AS TELEFON1, PsAgenturzuordnungen.ROLLENSTATUS, PsAgenturzuordnungen.EMAIL AS EMAIL1, pa_agenturen.ist_teilnehmer(PsAgenturzuordnungen.AGT_HAGTNR,PsAgenturzuordnungen.AGT_NAGTNR) AS IST_TEILNEHMER, PsBenutzer.BINSCHONTRENDJETTER, PsBenutzer.ERFASSUNGSDATUM, PsBenutzer.ERVEXKLUSIV, PsBenutzer.ERVEXKLUSIVBIS, PsBenutzer.MUSSLOGINAENDERN FROM PS_BENUTZER PsBenutzer, PS_AGENTURZUORDNUNGEN PsAgenturzuordnungen WHERE PsBenutzer.BER_ID = PsAgenturzuordnungen.BER_BER_ID AND ( ( (UPPER(PsBenutzer.NACHNAME) LIKE 'D'HEUR') ) )

    Single quotes must be doubled in SQL statements to be legal. I've filed Bug# 3574900 for us to do a better job on fixing up this case in the future, but there's an easy workaround idea for now.
    If you don't want the user to have to know/remember this, you could override the getViewCriteriaClause() method in your ViewObjectImpl class, and "fix up" the view criteria attributes to double-up occurrences of single apostrophe's before returning super.getViewCriteriaClause().
    Here's a quick web log entry on it with some sample code:
    http://radio.weblogs.com/0118231/2004/04/16.html#a276

  • Getting invalid-attribute-value Error during Delta Import on Call-based ECMA2

    I'm developing an ECMA2 MA to which supports delta imports.  I have found very few samples of working code to do delta imports, so my attempts are created
    using a lot of trial and error... Any samples of working Call based MA's with delta support would be much appreciated :-)
    The data is located in a SQL server and the schema (for delta) is like this (simplified):
    EmpID string
    Status string
    UPDATESTATUS string (<-- This is the update column with values New/Update/Delete)
    For each EmpID, there may be multiple Status values, i.e. Status should be imported into a multi value attribute in FIM.
    For the full import this is working as expected, but I run into issues when attempting to do the delta imports
    The code for the delta import
    private
    GetImportEntriesResults GetImportEntries_Delta(GetImportEntriesRunStep importRunStep)
    GetImportEntriesResults importReturnInfo;
    List<CSEntryChange> csentries =
    new List<CSEntryChange>();
    string employeeID =
    null;
    string appStatus =
    null;
    string currEmployeeID =
    CSEntryChange csentry =
    null;
    List<string> appStatusList =
    new List<string>();
    string changeMode =
    for (int i = currentReadRecord; i <= da.Tables["AppStatus"].Rows.Count - 1; i++)
    if (currEmployeeID != da.Tables["AppStatus"].Rows[i].ItemArray.GetValue(0).ToString().Trim())
    if (currEmployeeID !=
    "") // this should be true except for the first run
    csentry.AttributeChanges.Add(AttributeChange.CreateAttributeUpdate("IdentityStores", appStatusList));
    csentries.Add(csentry);
    appStatusList = new
    List<string>();
    if (csentries.Count >= m_importPageSize)
                  currentReadRecord = i;
    importReturnInfo = new
    GetImportEntriesResults();
    importReturnInfo.MoreToImport = (i <= da.Tables["AppStatus"].Rows.Count - 1);
    importReturnInfo.CSEntries = csentries;
    return importReturnInfo;
    changeMode = da.Tables["AppStatus"].Rows[i].ItemArray.GetValue(2).ToString().Trim();
    csentry = CSEntryChange.Create();
    csentry.ObjectType = "ApplicationIdentity";
    employeeID = da.Tables["AppStatus"].Rows[i].ItemArray.GetValue(0).ToString().Trim();
    currEmployeeID = (string)employeeID;
    switch (changeMode)
    case "New":
    csentry.ObjectModificationType = ObjectModificationType.Add;
    csentry.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("EmployeeID", employeeID));
    break;
    case "Update":
    csentry.ObjectModificationType = ObjectModificationType.Update;
    csentry.DN = employeeID;
    break;
    case "Delete":
    csentry.ObjectModificationType = ObjectModificationType.Delete;
                         csentry.DN = employeeID;
    break;
    default:
    throw new
    UnexpectedDataException(string.Format("Unknown modification type: {0}", changeMode));
    appStatus = da.Tables["AppStatus"].Rows[i].ItemArray.GetValue(1).ToString().Trim();
    appStatusList.Add(appStatus);
    // save the last object
    if (csentry != null)
    csentry.AttributeChanges.Add(AttributeChange.CreateAttributeUpdate("IdentityStores", appStatusList));
    csentries.Add(csentry);
    importReturnInfo = new
    GetImportEntriesResults();
    importReturnInfo.MoreToImport = false;
    importReturnInfo.CSEntries = csentries;
    return importReturnInfo;
    The code compiles and executes, but the delta import fails with the "invalid-attribute-value" message per csentry.
    From the eventlog I have the following message
    The server encountered an unexpected error while performing an operation for a management agent.
    "System.InvalidCastException: Unable to cast object of type 'System.Collections.Generic.List`1[System.String]' to type 'System.String'.
       at Microsoft.MetadirectoryServices.Impl.Ecma2ConversionServices.AddAttributeToDImage(CDImage* pdimage, String attributeName, AttributeModificationType
    attributeModificationType, IList`1 attributeValueChanges, Int32 escapeReferenceDNValues)
       at Microsoft.MetadirectoryServices.Impl.Ecma2ConversionServices.ConvertToDImage(CSEntryChange csEntryChange, CDImage** ppDImage, Int32 escapeReferenceDNValues)
       at Microsoft.MetadirectoryServices.Impl.ScriptHost.InvokeExtMA_ImportEntry(UInt32 cBatchSize, UInt16* pcszCustomData, UInt32 cFullObject,
    _OCTET* rgoctFullObject, UInt32* rgomodt, UInt32* pcpcszChangedAttributes, UInt16*** prgpcszChangedAttributes, Int32 fIsDNStyleNone, UInt16** ppszUpdatedCustomData, _OCTET* rgoctCSImage, Int32* rgextec, UInt16** rgpszErrorName, UInt16** rgpszErrorDetail, Int32*
    pfMoreToImport)"
    To me it seems as if FIM is unable to process the List of strings that is returned when processing the delta. Remember that this works OK when doing the full import. 
    Do you have any suggestions as to why this fails?
    Kjetil

    Hi,
    Thank you Søren! I got some good clues for the right direction from your answer. If anyone would be looking same answers the correct solution would be down below. I hope it would be help for someone else too.
    Get-Shema.ps1
    $obj
    = New-Object
    -Type PSCustomObject
    $obj
    | Add-Member
    -Type NoteProperty
    -Name "Anchor-Id|String"
    -Value 1
    $obj
    | Add-Member
    -Type NoteProperty
    -Name "objectClass|String"
    -Value "user"
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "IsLicensed|Boolean"
    -Value $true
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "FirstName|String"
    -Value ""
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "LastName|String"
    -Value ""
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "mail|String"
    -Value ""
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "immutableId|String"
    -Value ""
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "DisplayName|String"
    -Value ""
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "UsageLocation|String"
    -Value ""
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "ProxyAddresses|String[]"
    -Value ("","")
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "Licenses|String[]"
    -Value ("","")
    $obj
    Import.ps1
    #Always pass objects as hash table in pipeline
    foreach ($User
    in $Users)
    $obj = @{}
    $obj.Add("Id",
    $User.UserPrincipalName)
    $obj.Add("objectClass",
    "user")
    $obj.Add("IsLicensed",
    $User.IsLicensed)
    $obj.Add("FirstName",
    $User.FirstName)
    $obj.Add("LastName",
    $User.LastName)
    $obj.Add("mail",
    $User.UserPrincipalName)
    $obj.Add("immutableId",
    $User.immutableId)
    $obj.Add("DisplayName",
    $User.DisplayName)
    $obj.Add("UsageLocation",
    $User.UsageLocation)
    $obj.Add("ProxyAddresses", ($User.ProxyAddresses
    -ne ""))
    $obj.add("Licenses", ($User.Licenses.AccountSkuId))
    $obj
    Marti

  • Changing Element Attribute Values

    I spent far to long trying to figure out how to change an element attribute value without the FDK's SetAttributes function, so I thought I'd spare someone else the time.
    Basically, you still get the attributes using the GetAttributes() function, but now you just set the beg.child.Attributes property to the updated attribute value.
    //starting with a selected element
    elemSelect=app.ActiveDoc.ElementSelection
    //get the current attributes
    var childattributes =elemSelect.beg.child.GetAttributes()
    //find the attribute and value you want to change, and change it to a new value.
    childattributes[0].values[0] = "New_Value"
    //now assign the edited attributes to the selected element.
    elemSelect.beg.child.Attributes=childattributes
    Depending on how you selected the element, I assume you could do the above with beg.parent as well, but it wasn't something I needed to consider.
    ~Christen

    Thanks for this--you've likely saved me a headache.
    While I hadn't hit this yet, it does apply to several of the projects on my to-do list. Based on the info in the OMV, I would have expected to be able to simply use a statement like myElement.Attributes[i].value[i] = "New_Value" which, as I'm sure you discovered, has no apparent effect at all.
    The other thing I noticed in my quick testing is that defining your attributes variable by using the method (x = myElement.GetAttributes()) or by referenceing the Attributes property (x = myElement.Attributes) seem to be functionally equivalent.

  • Setting form attribute value with php

    i am having trouble setting the checked attribute value of a
    radio button based on the url parameter search. if search == all
    then checked == checked else checked == unchecked.
    <input type="radio" name="search" value="all"
    checked="<?php if ($_GET["search"] == "all") { echo"checked";}
    else { echo"unchecked";} ?>" />
    what am i doing wrong?

    This code should work
    <input type="radio" name="search" value="all" <?php if
    ($_GET["search"] == "all") { echo "checked";} ?> />

  • Sum on child nodes based on attribute value in xslt

    Hi all,
    Any one can post helpful code to calculate the sum of child nodes based on the attribute value of other child node.
    Let's say for example.
    I have one child element has attribute value let's say Tax so I have to put condition on child element having value of "Tax" I need to calcualte sum of Invoice amount that element is also child node
    After calculating sum I have to apply that sum at the header level of the Invoice. For each Invoice I have calculate sum and apply at the header level.

    It isn't working :(.Got the following error:
    An error was reported compiling the XPath expression: error: XPath expression invalid, not a selection: declare namespace ws = 'http://www.bea.com/wli/sb/transports/ws';
    declare namespace tuxedo = 'http://www.bea.com/wli/sb/transports/tuxedo';
    declare namespace wsa = 'http://schemas.xmlsoap.org/ws/2004/08/addressing';
    declare namespace http = 'http://www.bea.com/wli/sb/transports/http';
    declare namespace xsi = 'http://www.w3.org/2001/XMLSchema-instance';
    declare namespace wsp = 'http://schemas.xmlsoap.org/ws/2004/09/policy';
    declare namespace file = 'http://www.bea.com/wli/sb/transports/file';
    declare namespace xsd = 'http://www.w3.org/2001/XMLSchema';
    declare namespace soap12-env = 'http://www.w3.org/2003/05/soap-envelope';
    declare namespace flow = 'http://www.bea.com/alsb/flow/transport';
    declare namespace sftp = 'http://www.bea.com/wli/sb/transports/sftp';
    declare namespace sb = 'http://www.bea.com/wli/sb/transports/sb';
    declare namespace soap-enc = 'http://schemas.xmlsoap.org/soap/encoding/';
    declare namespace ejb = 'http://www.bea.com/wli/sb/transports/ejb';
    declare namespace soap-env = 'http://schemas.xmlsoap.org/soap/envelope/';
    declare namespace jpd = 'http://www.bea.com/wli/sb/transports/jpd';
    declare namespace email = 'http://www.bea.com/wli/sb/transports/email';
    declare namespace tp = 'http://www.bea.com/wli/sb/transports';
    declare namespace dsp = 'http://www.bea.com/dsp/transport/sb';
    declare namespace ctx = 'http://www.bea.com/wli/sb/context';
    declare namespace soap12-enc = 'http://www.w3.org/2003/05/soap-encoding';
    declare namespace wsu = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd';
    declare namespace jms = 'http://www.bea.com/wli/sb/transports/jms';
    declare namespace ftp = 'http://www.bea.com/wli/sb/transports/ftp';
    fn:string(./xml-fragment/@IntObjectName).

  • How can i change button's value with another button?

    You can see in file attach my problem.
    I'm trying change value of button with another button and two button can be off to. But buttons aren't it.
    Can you help me?
    Thanks.
    Attachments:
    Twobuttons.vi ‏27 KB

    Hola Carlos
    No tengo muy claro lo que quieres, pero te envio un ejemplo usando eventos, en que los 2 controles pueden estar a off a la vez pero no a on.
    Mira a ver si es lo que quieres. Usando eventos puedes hacer cualquiera logica.
    Espero que te sirva
    Saludos
    Alipio
    "Qod natura non dat, Salmantica non praestat"
    Attachments:
    Twobuttons.vi ‏31 KB

  • Selecting attribute values with XPath?

    Dear all,
    Is it possible to retrieve the value of a certain attribute in an XML document using an XPath expression? For instance, if I have the following doc:
    <someTag>
       <anotherTag attr="123" />
    </someTag>Is there one XPath expression that will return the value of the attribute attr of the element anotherTag, i.e. "123"?
    Cheers,
    N.

    I think /anotherTag/@attr/text() does the job.

Maybe you are looking for

  • IMessage & FaceTime Not Working on iPad after iOS 6.0.1 update?

    I have an iPad 16GB 3rd Generation and whenever I try to sign in with my Apple ID to Messages and FaceTime it pops up with "Could not sign in. Please check your network connection and try again." I have tried so many things for this including resetti

  • Restore Satelite A105/S2712

    My cd-rom drive is apparently not working and I am trying to run the system restore cd.  Is there anyway to run this without the cd to completely restore the computer back to factory/out of the box settings?  Please help

  • LR mobile import photos from your Iphone

    If you use LR Mobile to import photos from your phone to your desktop, are the images full res? And what happens if you let your CC subscription lapse - do they stay on your desktop or are they deleted? thanks, Elise

  • Help!!  my iPhone4s won't turn on

    My phone won't turn on.  I tried charging it. Holding down the sleep and home button still nothing. I even plugged my iPhone into my computer while holding down the home button and still nothing happened. Anyone know what I'm doing wrong?

  • Reg : Problem in Sending Mail Through Java Code

    Hi All, I wrote java code to send email to gmail. But am getting the error as following . Error: C:\jdevstudio10134\jdk\bin\javaw.exe -client -classpath "C:\jdevstudio10134\jdev\mywork\Prasad\Project1\classes;C:\Program Files\Java\jre1.5.0_14\lib\j2e