Why use xmlns:xacro="http://www.ros.org/wiki/xacro"?

@staff I tried messing up the hyperlink with random characters, but it still generated the URDF.Is the hyperlink just used just to act as a unique namespace or does the compiler actually visit this site and extract some syntax from it?

|825px;x164px;

Hi @Joseph1001,

I think having a look at XML Namespaces will help better than I trying to explain it to you with my own words:

Hi @ralves ,

I have gone through the link you shared. My understanding is as below:

  • The purpose of using an URI is to give the namespace a unique name.

  • However, companies often use the namespace as a pointer to a web page containing namespace information.

The second point is the one i am having difficulty with. Does it mean that some info is extracted from that hyper link or is it simply for the user to understand the syntax used?

Hi @Joseph1001,

Since “http://www.ros.org/wiki/xacro” does not contain structured information in a way that can be easily parsed, I would go for the second option:

Is it simply for the user to understand the syntax used

But I’ve had already experiences where the namespace is parsed (not in the xacro case), and putting a strange value in the namespace wouldn’t work.

I think having a look at XML Schema may also be helpful.

Hi @ralves ,
Thanks for helping out. The solution seem obvious now.

1 Like