This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XSLT to remove tag?

 
Gemini Moses
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Portion of my xsd file --



I want to get rid of all the tags including it's innner tag/ contents for
xs:simpleType.

The document has very complicated structure.
All I want to have in converted document is everything else as is except <xs:simpleType> tag.

Can I do this using xslt?
How?
Thanks!

[ May 06, 2005: Message edited by: Gemini Moses ]

Edit commetn:
Disabled smiles in this post. Added [ code ] tags without the spaces.

- m
[ May 07, 2005: Message edited by: Madhav Lakkapragada ]
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will have to use a template with xsl:copy constructas a generic template for all the elements. Then for the xs:simpleType element, you should write an empty template.

<xsl:template match="xs:simpleType">
<!-- do nothing here -->
</xsl:template>

This would consume all the simple Type element (and its content).
Thanks.

- m
 
Gemini Moses
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Madhav

That really helps!

Gemini
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nice shot Madhav.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic