Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
AmericanRev2 Posted November 26, 2018 Posted November 26, 2018 <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?
bfarber Posted November 26, 2018 Posted November 26, 2018 Have you tried using & (i.e. the HTML entity)?
AmericanRev2 Posted November 26, 2018 Author Posted November 26, 2018 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
bfarber Posted November 27, 2018 Posted November 27, 2018 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?
AmericanRev2 Posted November 27, 2018 Author Posted November 27, 2018 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/
bfarber Posted November 28, 2018 Posted November 28, 2018 Do you have a sample file that does not work?
AmericanRev2 Posted November 29, 2018 Author Posted November 29, 2018 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?
bfarber Posted November 29, 2018 Posted November 29, 2018 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.
AmericanRev2 Posted December 1, 2018 Author Posted December 1, 2018 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
AmericanRev2 Posted December 1, 2018 Author Posted December 1, 2018 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?
Nathan Explosion Posted December 1, 2018 Posted December 1, 2018 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
bfarber Posted December 3, 2018 Posted December 3, 2018 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).
AmericanRev2 Posted December 22, 2019 Author Posted December 22, 2019 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/
Recommended Posts
Archived
This topic is now archived and is closed to further replies.