# XML namespaces

**URL:** <https://forum.fixtrading.org/t/xml-namespaces/990>\
**Category:** General Q&A\
**Tags:** xid\_169683, imported, fast-protocol\
**Created:** [August 13, 2008, 7:38pm UTC](https://forum.fixtrading.org/t/xml-namespaces/990 "2008-08-13T19:38:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonathanwakely60\_x](https://avatars.discourse-cdn.com/v4/letter/j/5e9695/32.png) [@jonathanwakely60\_x](https://forum.fixtrading.org/u/jonathanwakely60_x)\
**Post date:** [August 13, 2008, 7:38pm UTC](https://forum.fixtrading.org/t/xml-namespaces/990/1 "2008-08-13T19:38:20Z")

</div>

Imported from previous forum

---

<div class="post-metadata">

**Author:** ![jonathanwakely60\_x](https://avatars.discourse-cdn.com/v4/letter/j/5e9695/32.png) [@jonathanwakely60\_x](https://forum.fixtrading.org/u/jonathanwakely60_x)\
**Post date:** [August 13, 2008, 7:38pm UTC](https://forum.fixtrading.org/t/xml-namespaces/990/2 "2008-08-13T19:38:20Z")

</div>

Hi,

One exchange I’m working with provides XML template definitions that begin like this:

\<?xml version="1.0" encoding="UTF-8" ?\>

and another provides:

\<?xml version="1.0" encoding="UTF-8" ?\>

This of course means the elements in the two documents are not the same element, and cannot be matched by a single XPath query.

Am I right in thinking that the second example should issue static error S1, according to section 4 of the FAST spec?

If that’s right, is the example of the concrete syntax on page 7 wrong, since it gives a different default namespace to that required by the RELAX NG schema.

Thanks for any help clarifying this,

Jonathan

---

<div class="post-metadata">

**Author:** ![jonathanwakely60\_x](https://avatars.discourse-cdn.com/v4/letter/j/5e9695/32.png) [@jonathanwakely60\_x](https://forum.fixtrading.org/u/jonathanwakely60_x)\
**Post date:** [August 13, 2008, 7:42pm UTC](https://forum.fixtrading.org/t/xml-namespaces/990/3 "2008-08-13T19:42:09Z")

</div>

Argh, the less-than symbols dont’ get escaped on submission, making it very difficult to post XML 🙂

> Hi,
> 
> One exchange I’m working with provides XML template definitions that  
> begin like this:

\<?xml version=“1.0” encoding=“UTF-8” ?\>  
\<templates xmlns=“[http://www.fixprotocol.org/ns/fast/td/1.1](http://www.fixprotocol.org/ns/fast/td/1.1)”\>

> and another provides:

\<?xml version=“1.0” encoding=“UTF-8” ?\>  
\<templates\>

This of course means the “template” elements in the two documents are  
not the same element, and cannot be matched by a single XPath query.

> Am I right in thinking that the second example should issue static error  
> S1, according to section 4 of the FAST spec?
> 
> If that’s right, is the example of the concrete syntax on page 7 wrong,  
> since it gives a different default namespace to that required by the  
> RELAX NG schema.
> 
> Thanks for any help clarifying this,
> 
> Jonathan

---

<div class="post-metadata">

**Author:** ![davidrosenborg30\_x](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@davidrosenborg30\_x](https://forum.fixtrading.org/u/davidrosenborg30_x)\
**Post date:** [August 13, 2008, 8:52pm UTC](https://forum.fixtrading.org/t/xml-namespaces/990/4 "2008-08-13T20:52:14Z")

</div>

Good catch, the example uses the wrong namespace. That namespace originates from earlier drafts of the specification and should of course have read “[http://www.fixprotocol.org/ns/fast/td/1.1](http://www.fixprotocol.org/ns/fast/td/1.1)” as you suggest.

/David

> Hi,
> 
> One exchange I’m working with provides XML template definitions that  
> begin like this:
> 
> \<?xml version="1.0" encoding="UTF-8" ?\> \<templates
> 
> xmlns=“[http://www.fixprotocol.org/ns/fast/td/1.1](http://www.fixprotocol.org/ns/fast/td/1.1)”\>
> 
> and another provides:
> 
> \<?xml version="1.0" encoding="UTF-8" ?\> 
> 
> This of course means the elements in the two documents are  
> not the same element, and cannot be matched by a single XPath query.
> 
> Am I right in thinking that the second example should issue static error  
> S1, according to section 4 of the FAST spec?
> 
> If that’s right, is the example of the concrete syntax on page 7 wrong,  
> since it gives a different default namespace to that required by the  
> RELAX NG schema.
> 
> Thanks for any help clarifying this,
> 
> Jonathan
