Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted November 26, 20186 yr <stateData stateName="Alabama" url = "https://www.mymilitia.com/forums/topic/43392-individual-state-militia-laws/?do=findComment&comment=49164" stateMode = "ON" initialStateColor= "5c5c5c" stateOverColor = "939393" stateSelectedColor = "3CBC8D"> on my custom maps, I'm unable to get one of them working that has 50 permalinks (links directly to a post) because evidently, you cannot have an "&" symbol in the xml code is there a workaround?
November 26, 20186 yr Author yes it does not work this is the link you can test different ideas i can not get any link to work my link can not contain an & symbol https://www.mymilitia.com/forums/topic/43392-individual-state-militia-laws/?do=findComment&comment=49164
November 27, 20186 yr The encoded value is valid XML https://www.ibm.com/support/knowledgecenter/en/SSS28S_3.5.0/com.ibm.form.designer.xfdl.doc/i_xfdl_g_computes_illegal_characters_in_xml_attributes.html When you say "it does not work", can you give some more details? Do you have a sample XML file that was generated which does not work? And how does it not work - is the XML not validating, or is whatever program that tries to use it not accepting it?
November 27, 20186 yr Author attached is working file. if i update the links from xenforo permalinks to ips the map page is just white and wont load usaMapSettings4.xml https://www.mymilitia.com/xml/usaMapSettings4.xml https://www.mymilitia.com/militia-laws-map/
November 29, 20186 yr Author the file i posted works, if you switch the links from xenforo perma links to IPS it does not work because of the & in the URL just switch the Alabama link to https://www.mymilitia.com/forums/topic/43392-individual-state-militia-laws/?do=findComment&comment=49164 and it will break the xml IPS permalinks are not xml compliant?
November 29, 20186 yr I think you're misunderstanding here. URLs (any URL, not ours) do not "comply" with XML standards, because they're not XML. They are URLs and adhere to a different standard. To use a URL in an XML document, it would need to comply with any XML requirements, including escaping of & and < characters. I just tested it, and this is in fact a valid XML document: <stateData stateName="Alabama" url = "https://www.mymilitia.com/forums/topic/43392-individual-state-militia-laws/?do=findComment&comment=49164" stateMode = "ON" initialStateColor= "5c5c5c" stateOverColor = "939393" stateSelectedColor = "3CBC8D"> Note how I used & instead of & in the URL. So, I can only deduce a few possibilities here: You did not escape the ampersand as I suggested The application that you are importing this XML file into is not actually XML compliant. Or perhaps your & character is somehow getting converted to a & mistakenly somewhere along the way. Think about it for a moment - an ampersand is a normal part of a query string. If it couldn't be used in XML, that would preclude just about every site on the internet from being able to generate search engine sitemaps and RSS feeds. The only thing you have to do is use the HTML entity version (&) but otherwise it's perfectly fine.
December 1, 20186 yr Author On 11/29/2018 at 9:17 AM, bfarber said: I think you're misunderstanding here. URLs (any URL, not ours) do not "comply" with XML standards, because they're not XML. They are URLs and adhere to a different standard. To use a URL in an XML document, it would need to comply with any XML requirements, including escaping of & and < characters. I just tested it, and this is in fact a valid XML document: <stateData stateName="Alabama" url = "https://www.mymilitia.com/forums/topic/43392-individual-state-militia-laws/?do=findComment&comment=49164" stateMode = "ON" initialStateColor= "5c5c5c" stateOverColor = "939393" stateSelectedColor = "3CBC8D"> Note how I used & instead of & in the URL. So, I can only deduce a few possibilities here: You did not escape the ampersand as I suggested The application that you are importing this XML file into is not actually XML compliant. Or perhaps your & character is somehow getting converted to a & mistakenly somewhere along the way. Think about it for a moment - an ampersand is a normal part of a query string. If it couldn't be used in XML, that would preclude just about every site on the internet from being able to generate search engine sitemaps and RSS feeds. The only thing you have to do is use the HTML entity version (&) but otherwise it's perfectly fine. The Link Does Not Work @bfarber https://www.mymilitia.com/forums/topic/43392-individual-state-militia-laws/?do=findComment&comment=49164
December 1, 20186 yr Author Xenforo Permalinks work in the xml file , IPS Permalinks do not work the only difference is the "&" I cannot create a working permalink without an "&" i wonder if i can use tinyurl's somehow to accomplish?
December 1, 20186 yr No offence, but you may be missing the point. Put this: https://www.mymilitia.com/forums/topic/43392-individual-state-militia-laws/?do=findComment&comment=49164 in your XML file and you will get this: https://www.mymilitia.com/forums/topic/43392-individual-state-militia-laws/?do=findComment&comment=49164 rendered when the xml file is viewed. See the attached file - same content, only difference is the changing of the & to & in the url. If you are still having issues....create an xml file with the non-working url and let us look at it. usaMapSettings4.xml
December 3, 20186 yr Yes, perhaps your importing system is not handling the & correctly and is converting it. I don't know what to say there. But XML is a standard, and all you need to do to comply with the standard is turn & into &. This has nothing to do with "our software" (or any specific software), as IPS did not invent the XML standard (or the standard governing URLs).
December 22, 20195 yr Author Not sure what issues i was having ... what nearly a year ago now but i did what you guys said and it works https://www.mymilitia.com/militia-laws-map/
Archived
This topic is now archived and is closed to further replies.