Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: vertical tab in XML

From: Pavel Lepin <p.lepin@-------.--->
To: NULL
Date: 11/6/2007 6:00:00 PM


Andy Fish <ajfish@b...> wrote in
<Jz%Xi.93842$vI1.19034@f...>:
> I have an xml document that contains an element like this:
> 
> <foo title="hello, world&#xB;"/>

No you don't:

pavel@debian:~/dev/xml$ xmllint vtab.xml
vtab.xml:1: parser error : xmlParseCharRef: invalid xmlChar
value 11
<foo title="hello, world&#xB;"/>
                             ^
pavel@debian:~/dev/xml$

> I can edit the file with visual studio or XML spy without
> any warnings. however, if I try to process it using .Net
> 2.0 XslCompiledTransform, I get the error:
> 
> System.ArgumentException: ' ', hexadecimal value 0x0B, is
> an invalid character.

Right on money.

> running the same transformation in .Net 1.1 or XMLSpy's
> built-in XSLT processor does not give an error.

Those are broken then. Complain about broken tools to the
tools' vendors (well, Microsoft seems to have fixed it, -
and good luck trying to get Altova to comply).

> I have seen in the XML specification that character code
> 0B (vt) is not a valid XML character but I'm not quite
> clear on whether this means that a character reference to
> vt is also invalid.

It does.

  2.2 Characters

  [Definition: A parsed entity contains text, a sequence of
  characters, which may represent markup or character data.]
  [Definition: A character is an atomic unit of text as
  specified by ISO/IEC 10646:2000 [ISO/IEC 10646]. Legal
  characters are tab, carriage return, line feed, and the
  legal characters of Unicode and ISO/IEC 10646. The
  versions of these standards cited in A.1 Normative
  References were current at the time this document was
  prepared. New characters may be added to these standards
  by amendments or new editions. Consequently, XML
  processors MUST accept any character in the range
  specified for Char. ] 

As I read it, it doesn't speak about the default
serialisation, but about the very XML infoset.

> either way surely something is wrong? - I created the file
> in .Net 2.0 using XmlDocument.Save() but I can't process
> it in .net 2.0.

Still broken then.

> this is exactly the sort of problem I thought using
> standard XML libraries was supposed to protect me from.

It is. So complain to the people who wrote those tools.

-- 
"I can't help but wonder if you... don't know a hell of a
lot more about practically every subject than Solomon ever
did."


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent