Hi everybody, I need to take an xml file and remove 2 certain namespaces from it using XSLT("scrubbing metadata"). Also, I believe I would need to use the Transformer class in combination with the XSLT. Can someone help me out? Possibly giving me an example with namespace "A" and namespace "B"? Thanks.
k.e.v 0 Newbie Poster
Recommended Answers
Jump to PostThis should do what you want:
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:freshness="http://freshness" xmlns:history="http:history" xmlns:wo="http:hello"> <xsl:output method="xml" indent="no"/> <xsl:template match="/|comment()|processing-instruction()"> <xsl:copy> <!-- go process children (applies to root node only) --> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="*"> …
Jump to PostSorry but I do not have the time to do so. Since you are calling a stylesheet a transformation class, I suspect that your knowledge of XSL is minimum. I suggest you invest in a good book on XSLT either by Jenni Tennison or Michael Kay.
All 6 Replies
iceandrews 0 Junior Poster
k.e.v 0 Newbie Poster
fpmurphy 9 Junior Poster
k.e.v 0 Newbie Poster
fpmurphy 9 Junior Poster
k.e.v 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.