Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is the XSLT processor connecting to the defined namespace reference?

when a XSLT-transformation is running, what does the XSLT-processor during parsing the namespace?

Here an example of a part of a stylesheet:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

Does then the processor is getting connected to http://www.w3.org/1999/XSL/Transform ?
I’m asking in context of security if the reference is compromised.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

No, it will not connect to http://www.w3.org/1999/XSL/Transform and download anything.

XML namespaces are strings. Their only purpose is to be unique. The XML specification states that they follow the URI format, i.e. a superset of web URLs, but for all practical purposes in the context of XML, they are strings without any deeper meaning attached.

Nothing in the mechanism behind XML namespaces requires downloading anything form an external source, and no XSLT processor or XML parser will ever attempt to treat a namespace as a URL or a filename.

URLs are unique, they belong to an organization, they are easy to tell apart, and you could even store human-readable information there if you wanted to. So they are more practical to humans than, say, random GUIDs. But for XML parsers, they only are strings that allow making a difference between <foo xmlns="namespace1" /> and <foo xmlns="namespace2" />. That namespace1 potentially maybe also is a web address is completely irrelevant to the XML parser.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading