You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Michael Lindeboom <mi...@bms.com> on 2006/01/19 17:08:17 UTC

XML declaration and encoding

I notice that Batik does not require the XML declaration at the start of 
an SVG file. Is there a reason for this? Also, if the encoding is not 
specified, what encoding is used?

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: XML declaration and encoding

Posted by Cameron McCormack <ca...@aka.mcc.id.au>.
Hi Michael.

Michael Lindeboom:
> I notice that Batik does not require the XML declaration at the start of 
> an SVG file. Is there a reason for this?

The reason is that it is optional:

  http://www.w3.org/TR/REC-xml/#sec-prolog-dtd

> Also, if the encoding is not specified, what encoding is used?

If the document is in UTF-8, or UTF-16 with a Byte Order Mark at the
beginning of the document, it will be detected as such.  Otherwise, it's
an error.  See:

  http://www.w3.org/TR/REC-xml/#charencoding
  http://www.w3.org/TR/REC-xml/#sec-guessing

Cameron

-- 
 Cameron McCormack			ICQ: 26955922
 cam (at) mcc.id.au			MSN: cam (at) mcc.id.au
 http://mcc.id.au/			JBR: heycam (at) jabber.org

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org