I am having a problem creating a xsl stylesheet with dom4j.  My problem is 
with namespaces.

Here is what I want to create:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
...
</xsl:stylesheet>

Currently when I try to create the above in dom4j, I get the below 
example.  I also included the code that I used to generate the bad xsl 
stylesheet.  I would appreciate being corrected!
Thanks.

What is currently generated:
<?xml version="1.0" encoding="UTF-8"?>

<stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
</stylesheet>

         Namespace ns = new Namespace("xsl", 
"http://www.w3.org/1999/XSL/Transform";);
         Document document = DocumentHelper.createDocument();
         Element element = document.addElement( "stylesheet" );
         element.add(ns);
         element.setAttributeValue("version", "1.0");



_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to