Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <Schedule xmlns="http://www.xxx.com/12022012/schedule/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xxx.com/12022012/schedule/v2 ../Schema/Schema_v2.xsd">
- <Interface_Header>
- </Interface_Header>
- ...
- </Schedule>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output omit-xml-declaration="yes" indent="yes"/>
- <xsl:template match="node()|@*">
- <xsl:copy>
- <xsl:apply-templates select="node()|@*"/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ns="new_namespace">
- <xsl:output method="xml" indent="yes"/>
- <xsl:template match="@xsi:schemaLocation">
- <xsl:attribute name="xsi:schemaLocation">
- <xsl:text>new_schema_location</xsl:text>
- </xsl:attribute>
- </xsl:template>
- <xsl:template match="node() | @*">
- <xsl:copy>
- <xsl:apply-templates select="node() | @*"/>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="*">
- <xsl:element name="{local-name()}" namespace="ns">
- <xsl:apply-templates select="node() | @*"/>
- </xsl:element>
- </xsl:template>
- </xsl:stylesheet>
- <Schedule xsi:schemaLocation="new_schema_location" xmlns="ns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <Interface_Header>
- </Interface_Header>
- ...
- </Schedule>
- <xsl:output indent="yes" method="xml"/>
- <xsl:template match="/">
- <xsl:apply-templates select="node()|@*"/>
- </xsl:template>
- <xsl:template match="node()|@*">
- <xsl:copy>
- <xsl:apply-templates select="node()|@*"/>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="@*[local-name() = 'schemaLocation']">
- <xsl:attribute name="schemaLocation">newSchemaLocation</xsl:attribute>
- </xsl:template>
- <xsl:stylesheet
- version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- ...
- <xsl:template match="@*[name() = 'xsi:schemaLocation']">
- <xsl:attribute name="xsi:schemaLocation">newSchemaLocation</xsl:attribute>
- </xsl:template>
- </xsl:stylesheet>
Add Comment
Please, Sign In to add comment