You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by David Bertoni <db...@apache.org> on 2007/04/17 22:30:37 UTC

Re: Is this a XALAN document identification bug?

Larry Trammell wrote:
 > Hi from a list and XALAN newbie seeking the advice of world class GURU -
 > experienced and knowledgeable XALAN expert - competent XALAN user - anybody
 > with a clue - about whether the behavior described below is a user error /
 > known feature / bug that should be reported to the XALAN staff.
 >
...

 >
 > Now repeat using the same XML document except WITH valid document
 > identification tags.
 >
 >   <?xml version="1.0"?>
 >   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 >      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 >   <html>
 >   ...

The XHTML DTD is notorious for introducing a fixed attribute that declares 
a default namespace binding.

 >
 > or
 >
 >   <?xml version="1.0"?>
 >   <html xmlns="http://www.w3.org/1999/xhtml">
 >   ...

Yes, that's the default namespace.

 >
 > For these: incorrect processing. Default rule is applied, producing the
 > following incorrect results.

No, the processing is correct.  Your stylesheet no longer matches the input 
document.  You need to read the XSL FAQ and understand how the default 
namespace works with XPath.

 >
 >   <?xml version="1.0" encoding="UTF-8"?>
 >    Main title
 >     Example text highlighted.
 >
 > Any advice? I could always run an AWK pre-processing step and strip out
 > the document identification lines manually, but this seems inelegant.
 >

By the way, this is a DOCTYPE declaration (document type declaration), not 
a "document identification line."


Dave