xslt 1.0 - Copy elements using xsl:copy-of without attributes -
i have xml shown below
<?xml version="1.0" encoding="utf-8"?> <schools> <city>marshall</city> <state>maryland</state> <highschool> <schoolname>marshalls</schoolname> <department id="1"> <deptcode seq="1">d1</deptcode> <deptname seq="2">chemistry</deptname> <depthead seq="3">henry carl</depthead> <deptrank seq="4">l</deptrank> </department> <department id="2"> .. .. .. </highschool> </schools>
in xsl copying contents section based on deptcode using
<xsl:copy-of select="*">
this produces result attributes in element tags. possible ignore attributes while using xsl:copy-of?
the desired result shown below
<deptcode>d1</deptcode> <deptname>chemistry</deptname> <depthead>henry carl</depthead> <deptrank>l</deptrank>
xsl:valueof working required trying know if can done in xsl:copy-of? note, in requirement, there 5 or 6 attributes each element. can please help? in advance..
regards udayakiran
xsl:valueof working required trying know if can done in xsl:copy-of?
no. xsl:copy-of
bundle deal, cannot pick , choose. avoid repetitive coding, utilize template matching department/*
.
attributes xslt-1.0
No comments:
Post a Comment