Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tough Question... sub nodes, multiple match...

Status
Not open for further replies.

rjonesX

Technical User
Jun 18, 2001
56
US
Here is how the XML is set out...

{?xml version="1.0" ?}
{?xml:stylesheet type="text/xsl" href="main.xsl" ?}
{ussa}
{update}
{field id="TITLE" taborder="1"}
{field_value}Jenny{/field_value}
{/field}
{field id="TYPE" taborder="2"}
{field_value}LEGISLATIVE UPDATE FACT SHEET{/field_value}
{/field}
{field id="BLURB" taborder="3"}
{field_value}110 Crown Drive{/field_value}
{/field}
{field id="DATE" taborder="4"}
{field_value}Oklahoma City, OK 73114{/field_value}
{/field}
{field id="ORDER" taborder="5"}
{field_value}4055559873{/field_value}
{/field}
{field id="STATUS" taborder="6"}
{field_value}CURRENT{/field_value}
{/field}
{/update}
{/ussa}

basically, here is what Im doing:

I am calling an xsl:for-each where the field_value of field id "STATUS" is equal to "CURRENT"

Other entries can have CURRENT or ARCHIVED as their value (to divide articles by current or archived... pretty simple)

First, I need to know how to do that.. here is what I guessed...

{xsl:for-each select="ussa/update[field/field_value$eq$'CURRENT']"}

is this correct? is there anyway I can get it to include the attribute? @ID=STATUS in there so it knows what node to check?

also, how can I havae it after that use the {xsl:if} command to further separate the xml by only printing out those who are marked current and have the @id=type value of LEGISLATIVE UPDATE FACT SHEET ???

any ideas???

russ jones
rjones@email.unc.edu
 
russ,

use xsd functions(that will seperate the current and archieved listing----plus what ever other type of data schemas that you wish to have broken down) that then tie into to your xsl.

Aaron Fear is the mind killer!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top