URI is not registered: what should I do?
I'm facing a small issue with the code below:
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="18px" height="18px" viewBox="0 0 48 48" enable-background="new 0 0 48 48" xml:space="preserve">
<line fill="none" stroke="#000000" stroke-width="8" stroke-miterlimit="10" x1="0" y1="8.907" x2="48" y2="8.907"/>
<line fill="none" stroke="#000000" stroke-width="8" stroke-miterlimit="10" x1="0" y1="24.173" x2="48" y2="24.173"/>
<line fill="none" stroke="#000000" stroke-width="8" stroke-miterlimit="10" x1="0" y1="39.439" x2="48" y2="39.439"/>
<?php _e( 'Menu', 'requiredfoundation' ); ?>
</svg>
It says the that the URI is not registered, but I don't know what to do to make this error disappear.
Any tip?
Please sign in to leave a comment.
Hi Andrea,

Place cursor on error and press Alt+Enter (or click on light bulb icon).
Then choose most appropriate option for you (it could be "Remove unused namespace declaration" to remove it from the file .. or just disable that particular inspection -- the same menu entry but press Right (or click in arrow on right side) and choose additional option from submenu)
P.S.
I'm not familiar with svg and cannot advice what is the most correct action should be taken here (e.g. Remove .. or just Disable Inspection)
I'm not familiar with svg and cannot advice what is the most correct action should be taken here (e.g. Remove .. or just Disable Inspection)
Me neither, but rather than disable this inspection or disable it file by file, I'd prefer to have phpStorm recognize this namespace. I just wonder how I can do it.
Well .. you can try this:
Yes, I tried this already (I didn't mention as I thought I did something stupid :)), but nothing changes.
I've tried either doing as you said (downloading and refering the downloaded file) and referencing the original URL: that piece of code keeps being red.
Screenshot please (with exact error message and file contents) as it helped in my tests.
Here you go
Attachment(s):
URI is not registered 002.png.png
URI is not registered 001.png
Image 002 -- you did it wrong.
URI should be http://www.w3.org/1999/xlink and then on "Expolorer" tab you point to the file location on your HDD.
The final result should look similar to what I showed you, just path should be not Windows-looking but your Mac one.
Great!
I confused things a bit.
Thank you!