vertical tab in XML

A

Andy Fish

hello,

I have an xml document that contains an element like this:

<foo title="hello, world "/>

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.

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

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.

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. this is exactly the
sort of problem I thought using standard XML libraries was supposed to
protect me from.

Andy
 
P

Pavel Lepin

Andy Fish said:
I have an xml document that contains an element like this:

<foo title="hello, world "/>

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 "/>
^
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.
 
R

Richard Tobin

[I'm not honouring the Followup-To: line since we don't have that
newsgroup here, and anyway this is relevant in comp.text.xml.]

No you don't:

Here is an XML document containing that element:

<?xml version="1.1"?>
<foo title="hello, world "/>

Whether your tools support XML 1.1 is another matter.

-- Richard
 
P

Pavel Lepin

It seems I just won the Paper Bag for the sloppiest post of
Nov 2007. Oh well. It is an honour.

Richard Tobin said:
[I'm not honouring the Followup-To: line since we don't
[have that newsgroup here, and anyway this is relevant in
comp.text.xml.]

Oops, my fault entirely. I haven't noticed that the original
message was crossposted, and my newsreader is configured to
automatically set follow-ups to just one group if that is
the case.
Here is an XML document containing that element:

<?xml version="1.1"?>
<foo title="hello, world "/>

Whether your tools support XML 1.1 is another matter.

Oops, my fault again - on two counts. I ignored the fact
that this was just a part of the document and decided that
the lack of the declaration implied the OP was dealing with
XML 1.0.

Apart from that, I looked at 2.2 in XML 1.1 SE just out of
sporting interest and staggered away fifteen minutes later,
utterly confused but under the impression that the
characters in RestrictedChar production were still
disallowed: it's mentioned only a couple more times in the
spec, defining those characters as disallowed in documents
and external parsed entities.

Seemingly my caffeine intake was below normal yesterday.

Today, knowing the correct answer, I realised that
RestrictedChars were allowed as character references, due
to changes in Char production, and following from verbiage
in 4.1 (and it's explicitly stated in layman's terms in 1.3
to boot... well, duh).

Those damned lawyers.

I wonder if there are any courses in language lawyering? I
seem to be doing a lot of that recently, and fail miserably
more often than not.
 
J

Joseph Kesselman

Pavel said:
I wonder if there are any courses in language lawyering?

The best way to learn that skill, as far as I know, is to actually be
involved in writing a specification of this sort. Writing a few patents
also helps, but it's a slightly different set of issues.

The W3C specs in particular have two problems. One is that there's a
"cultural" mandate that they be "prescriptive rather than descriptive"
-- it's asserted that these specs are written for an expert reader, and
that anyone who isn't an expert in this specific area will be reading
tutorials and articles rather than the spec itself. The other is that
while companies are willing to donate techical skills to the W3C (to
make sure the spec says the right things), they are unfortunately much
less willing to donate techical-writing skills (to make sure the spec is
actually readable). The W3C does have a few real technical writers, but
they're overloaded and usually can't get involved until very late in the
process, which limits how much they can help.
 
A

Andy Dingley

The best way to learn that skill, as far as I know, is to actually be
involved in writing a specification of this sort. Writing a few patents
also helps, but it's a slightly different set of issues.

My last patent (a useful one) was so mangled by the corpo-prat lawyers
writing it that I no longer recognised it. The one before that managed
to shift its claims enough that it started to overlap with something
Google had obviously been doing publically for years.

I have great respect for people writing specs (I've never personally
been on a W3 WG, but I've lived in the next cube and sat in a bit on
their meetings). Patent lawyers though!
 
P

Pavel Lepin

Joseph Kesselman said:
The best way to learn that skill, as far as I know, is to
actually be involved in writing a specification of this
sort.

Tempting, tempting. But four thousand euro is a good bit
more that I can cough up at the moment.

ObXML: I can just see myself in HTML WG meetings, though:

"...also, I submit that we all must honourably commit
seppuku right now rather than serve the Dark Side by
producing the HTML 5 spec."
Writing a few patents also helps, but it's a slightly
different set of issues.

Unless I'm much mistaken, we don't have software patents on
this side of the pond. Thank god for that, too.
 
R

Richard Tobin

Tempting, tempting. But four thousand euro is a good bit
more that I can cough up at the moment.

It is possible to participate in W3C Working Groups as an invited
expert, though I don't know the details of the procedure.

-- Richard
 
P

Pavel Lepin

Richard Tobin said:
It is possible to participate in W3C Working Groups as an
invited expert, though I don't know the details of the
procedure.

Yes, but I don't qualify. If I paid four thousand for the
honour, messing the specs up would be perfectly fine with
me. Being invited as an expert, when I'm hardly anything of
the sort, and then leaving my, er, unmistakable imprint on
the recommendations the world is going to use for years to
come - that wouldn't be, well, my kind of thing.
 
A

Andy Dingley

It is possible to participate in W3C Working Groups as an invited
expert, though I don't know the details of the procedure.

Get a job at a big fluffy corporate with a relaxed work ethic. You get
on the WG and they give _you_ the thousands of euro :cool:
 
A

Andy Dingley

ObXML: I can just see myself in HTML WG meetings, though:

"...also, I submit that we all must honourably commit
seppuku right now rather than serve the Dark Side by
producing the HTML 5 spec."

That's just gone up on our corporate wiki, under HTML 5 :cool:
 
P

Pavel Lepin

Andy Dingley said:
That's just gone up on our corporate wiki, under HTML 5
:cool:

It's really a "ha ha only serious" thing. I suppose it would
make a good .sig, too.
 
J

Joseph Kesselman

Richard said:
It is possible to participate in W3C Working Groups as an invited
expert, though I don't know the details of the procedure.

It's also possible to participate by getting involved in the Interest
Group associated with one of the working groups. Some WGs treat the IG
as auxilliary WG members; some don't. If you make yourself valuable
enough as an IG member, you *may* get an invitation to become more
official. That's essentially how I got roped in, though in my case I
wound up taking over one of my company's delegate slots.

I don't remember whether IG involvement is limited to official W3C
members or not.
 
P

Pavel Lepin

Joseph Kesselman said:
Richard said:
It is possible to participate in W3C Working Groups as an
invited expert, though I don't know the details of the
procedure.

It's also possible to participate by getting involved in
the Interest Group associated with one of the working
groups.
[...]

I don't remember whether IG involvement is limited to
official W3C members or not.

Depends on the group in question:

http://www.w3.org/2003/06/Process-20030618/groups.html#ig-mail-only

Some allow public participation, some don't, whatever they
decide to write in the group's charter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top