ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin LaVergne <klaver...@comcast.net>
Subject Re: problem using 'style' task: "xmlns" cannot be bound ...
Date Thu, 22 May 2003 16:10:05 GMT
Yaron,

The namespace "xmlns" is a predefined namespace, therefore you should not 
declare it. I would suggest removing the declaration in your xsl file that 
defines this and try it again.

Example:
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance">
...

Hope this helps.

Kevin

On Thu, 22 May 2003 18:34:33 +0200, Yaron Ruckenstein 
<yaron.ruckenstein@mobilitec.com> wrote:

> Hi,
>
> I'm trying to perform xml translation using the 'style' task.
> It worked fine in the development environment (Sonic - Stylus Studio),
> but failed with ant.
>
> Anyone knows why ?
>
> Thanks in advance, Yaron.
>
> I use the following ant task:
>
> 	<style in="data/in/new_topology.xml" 
> 		out="data/out/processed_topology.xml" 		extension=".xml" 
> 		style="topology_process.xsl" 		processor="trax"/>
>
> And get the following output:
>
> [style] Processing C:\1\data\in\new_topology.xml to 
> C:\1\data\out\processed_topology.xml
> [style] Loading stylesheet C:\1\topology_process.xsl
> [style] [Fatal Error] topology_process.xsl:2:180: The prefix "xmlns" 
> cannot be bound to any namespace explicitly; neither can the namespace 
> for "xmlns" be bound to any prefix explicitly.
> [style] : Fatal Error! org.xml.sax.SAXParseException: The prefix "xmlns" 
> can
> not be bound to any namespace explicitly; neither can the namespace for 
> "xmlns" be bound to any prefix explicitly. Cause: 
> org.xml.sax.SAXParseException: The prefix "xmlns" cannot be bound to any 
> namespace explicitly; neither can the namespace for "xmlns" be bound to 
> any prefix explicitly.
> [style] Failed to process C:\1\data\in\new_topology.xml	
>
>
> This is the beginning of my xsl file:
>
> 	<?xml version="1.0" encoding="UTF-8"?>
> 	<xsl:stylesheet version="1.0" 
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
> xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" 
> xmlns:xmlns="http://www.w3.org/2000/xmlns/">
> <xsl:output method="xml"/>
> <xsl:output indent="yes"/>
> <xsl:output standalone="yes"/>
>
> I'm using Ant 1.5.2 and I placed the xalan-j_2_5_0 xalan.jar file in 
> ant's lib directory.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>




Mime
View raw message