Jump to content

Select Nodes


Guest ANGEL

Recommended Posts

Guest ANGEL

I am so very new with all this.......... :) We have an web based application that references data within XML data Island to populate pull down menus.I need to be able to select data from within data island 1 - (Customers) based on a value within data island 2 - (Activities).Data Island 1 - Activities<XML ID="xmlAct"> <?xml version="1.0"?><activities><primary id="1" displaycode="Absence" customer="0" serial="0" bu="0" datevalidation="0"><secondary activityid="121" lieutime="0">Bank Hol</secondary><secondary activityid="122" lieutime="0">Holiday</secondary><secondary activityid="126" lieutime="-1">Lieu</secondary></primary><primary id="2" displaycode="Admin" customer="0" serial="0" bu="0" datevalidation="0"><secondary activityid="118" lieutime="0">Admin</secondary><secondary activityid="120" lieutime="0">Admin/Idle</secondary><secondary activityid="257" lieutime="0">BU Sfty</secondary><secondary activityid="426" lieutime="0">Int Mtg</secondary></primary>Data Island 2 - Customers<XML ID="xmlCust"> <?xml version="1.0"?><customers><customer id="12345" name="ABC"><machine MachType="BB.123" delivery="36608" warrstart="36731" warrstartgap="36761" warrexpiry="37095" warrexpirygap="37125" syshandoff="36731" accept="36731">AA.12345</machine><machine MachType="AA.123" delivery="36670" warrstart="36845" warrstartgap="36875" warrexpiry="37210" warrexpirygap="37240" syshandoff="36845" accept="36845">AA.12341</machine><machine MachType="AA.321" delivery="36675" warrstart="36814" warrstartgap="36844" warrexpiry="37179" warrexpirygap="37209" syshandoff="36814" accept="36814">AA.12342</machine></customer></customers>ProblemI need to say where id = 1 within xmlAct then only select attributes within xmlcust that have a MachType value of '*.123'If I have been at all vague (which I know I have been but thats because I haven't got a clue what I'm talking about then please let me know)This has now become an urgent issue and I desperately need some help.Thanks ever so mych

Link to comment
Share on other sites

Data Islands don't have conditionals or anything. The only way you have chance achieving something with it would be by some complex JavaScript. Not to mention it works only with IE anyway.A lot easier way would be few conditionals in XSLT but then other problems for initiating it may arise.

Link to comment
Share on other sites

  • 2 weeks later...

Have a look at this, I was trying to do a similar thing:Dooberry's excellent adventureI found a way to show the current value using <xsl:if> as well.I would suggest before you go any further you read through the XSL tutorials because XML data islands are not very effective, HTML is not really designed to do much with XML (without a lot of scripting!!).Hope you find something useful.Dooberry

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...