[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Checking for nodes in other nodes

Subject: Checking for nodes in other nodes
From: "Simon, Jb" <jb.simon@xxxxxxxx>
Date: Tue, 07 Jun 2005 11:29:44 -0400
 Checking for nodes in other nodes
Given the following XML

<EnumeratedType>
	<Name>Speed Type</Name>
	<Enumeration>
		<Name>Low</Name>
		<Value>1</Value>
	</Enumeration>
	<Enumeration>
		<Name>Med</Name>
		<Value>5</Value>
	</Enumeration>	<Enumeration>
		<Name>High</Name>
		<Value>8</Value>
	</Enumeration>
</EnumeratedType>

<Equipment>
	<Name>Motor</Name>
	<Message>
		<Name>Motor Speed</Name>
		<Field>
			<Name>MotorID</Name>
			<DataType>integer</DataType>
		</Field>
		<Field>
			<Name>Speed<Name >
			<DataType>Enumerated Type</DataType>
			<EnumeratedType>Speed Type</EnumeratedType>
		</Field>
	</Message/
</Equipment>

What I need to be able to determine is if an enumerated type is used in
more than one equipment. (The XSL is used to generate C code, and each
equipment is generated to a different file. If the type is used in
multiple pieces of equipment then it should be generated to a
"common_types.h" file, if it is only used by ne piece of equipment then
it should be generated in that equipment's file)

Currently I can use the same .xsl to generate the different files, using
a command line parameter, however, all of the enumerated types are
generates to all files at this point. I'm pretty noob and cluless about
xslt, so I don't even know where to begin to attempt this part of the
task.

Thanks
Joe Simon

--------------------------------
This Sig Intentionally Left Blank

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.