Jump to content

Spaces in version attribute allowed


dvdlei

Recommended Posts

This:<?xml version="1.0" encoding="UTF-8"?>or this:<?xml version='1.0' encoding='UTF-8'?>...you need them like that.Why do you not?

Link to comment
Share on other sites

This:<?xml version="1.0" encoding="UTF-8"?>or this:<?xml version='1.0' encoding='UTF-8'?>...you need them like that.Why do you not?
We receive this XML from an external party, and I wonder if it's fair to tell them they are not following the exact XML specs. What do you think?
Link to comment
Share on other sites

The syntax of the spec is known as BNF. Read more about it in ALA's article How to Read W3C Specs?.According to it, and the XML spec itself, it seems using spaces between the equal sign is allowed. It's not exactly a best practice but it's allowed. So technically speaking, they are not violating the spec. It's fair to tell them that they are not using best writing practices, but invalid/not well formed - certanly not.

Link to comment
Share on other sites

The syntax of the spec is known as BNF. Read more about it in ALA's article How to Read W3C Specs?.According to it, and the XML spec itself, it seems using spaces between the equal sign is allowed. It's not exactly a best practice but it's allowed. So technically speaking, they are not violating the spec. It's fair to tell them that they are not using best writing practices, but invalid/not well formed - certanly not.
Thank you for your clear answer boen_robot, The BNF standard was new for me and helped me alot with interpreting the syntax of these specs.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...