1

I have an XML

EDITED:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="xsl.xslt"?> 
<CATALOG>
<CD>        
</CD>   
</CATALOG>

I have XSLT:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"    xmlns:xs="http://www.w3.org/2001/XMLSchema" >
<xsl:output exclude-result-prefixes="xsl xs" indent="yes"/>

 <xsl:template match="*">      
<xsl:element name="{lower-case(local-name())}">
    <xsl:apply-templates/>
</xsl:element>
</xsl:template>    

</xsl:stylesheet>

I want to check the output I Think it should be

<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited by XMLSpy® -->
<catalog>
<cd>        
</cd>   
</catalog>

Where I can check or verify that output is correct or not. Do I need to use any tool for this?

1
  • Have you checked the online resources? For example this page seems to do exactly what you need: w3.org/2005/08/online_xslt Commented Jun 23, 2012 at 2:14

2 Answers 2

1

Add

<?xml-stylesheet type="text/xsl" href="xsl.xslt"?> 

to your xml file under the xml dec and open it in a web browser.

Sign up to request clarification or add additional context in comments.

2 Comments

Hi Ryet0, I modified <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="xsl.xslt"?>. Its not working is this correct?
This won't work. The stylesheet is XSLT 2.0 and won't run in the browser. @user965884 - You'd be better off using a 2.0 processor like Saxon, or AltovaXML. Better yet use a good IDE like oXygen or XMLSpy (which is what was used to create the XML).
0

You can put this in top of the XML Data and run that in the Browser.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<?xml-stylesheet type="text/xsl" href="Your_xslt_file.xsl"?>

Let me know if this helps.. :)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.