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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

extract values from xsd using xsl

Status
Not open for further replies.

ozane

Technical User
Feb 3, 2005
57
TR
Hi...
i am working on a web based tool. it is connecting to remote servers and receives a XSD as a response. what i need for next level is elements from xsd. here is the sample part of xsd
Code:
<xsd:element name="park" type="myns:park_Type" substitutionGroup="gml:_Feature"/>
	<xsd:complexType name="park_Type">
		<xsd:complexContent>
			<xsd:extension base="gml:AbstractFeatureType">
				<xsd:sequence>
					<xsd:element ref="gml:polygonProperty" minOccurs="0"/>
					<xsd:element name="AREA" type="string"/>
					<xsd:element name="PERIMETER" type="string"/>
					<xsd:element name="PARK_" type="string"/>
					<xsd:element name="PARK_ID" type="string"/>
					<xsd:element name="NAME_E" type="string"/>
					<xsd:element name="NAME_F" type="string"/>
					<xsd:element name="YEAR_EST" type="string"/>
					<xsd:element name="REG_CODE" type="string"/>
					<xsd:element name="AREA_KMSQ" type="string"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

sometimes there are several elements in that xsd like above example.
i am trying to get those elements usign xslt. then those will populate different db tables.
how can i get that values from xsd with xslt?
for example i get the main elements like that
Code:
<xsl:for-each select="//xsd:element[@substitutionGroup='gml:_Feature']">
<xsl:value-of select="@name"></xsl:value-of>
,</xsl:for-each>
what about the other elements and their "name" attribute?
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top