From: Danny Vint
Sent: Monday, March 10, 2014 10:31 AM
To: 'xmltask-users@lists.sourceforge.net'
Cc: Danny Vint
Subject: xmltask creating an namespace that doesn't appear in the source.

 

I’m processing basic xhtml files that have the following structure:

 

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html

  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xml:lang="en-us" lang="en-us">

</html>

 

I’m using this to just remove the doctype statement on a bunch of files like above:

 

<XmlTask todir="${wkdy.export.dir}" encoding="utf-8" outputter="simple" standalone="true" >

      <fileset dir="${wkdy.export.dir}">

        <include name="**/*.htm"/>

      </fileset>

</XmlTask>

 

The result is the DOCTYPE statement is removed, but now instead of that I have a default namespace declaration being created on the html element:

 

<?xml version="1.0" encoding="utf-8" standalone="yes"?>

 

<html lang="en-us" xml:lang="en-us" xmlns="http://www.w3.org/1999/xhtml">

</html>

 

I do further processing on these files with XSLT and that namespace just broke those steps. I’m not finding anyway in the doc to control this, nor did I find anything that said I should expect this to happen. Any idea what I can do?

 

..dan

 

 

Dan Vint
Documentation Tools Developer
danvint.workday (Skype)
dan.vint@workday.com