Sitemap xml tag error for search console: Invalid XML tag <sitemap> - google-search-console

I am having trouble with submitting this master XML to google with 2 sub-sitemap.xml intact.
When I submit it to search console for indexing, it gives me this error:
Errors Invalid XML tag This tag was not recognized. Please fix it and
resubmit. Parent tag: urlset Tag: sitemap
My master sitemap.xml as follow, and thank you for the help~
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.domain.domain/</loc>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<sitemap>
<loc>https://www.domain.domain/sitemap5-0.xml</loc>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</sitemap>
<sitemap>
<loc>https://www.domain.domain/sitemap5-1.xml</loc>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</sitemap>
</urlset>

You need to replace your sitemap elements with url:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.domain.domain/</loc>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://www.domain.domain/sitemap5-0.xml</loc>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://www.domain.domain/sitemap5-1.xml</loc>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
</urlset>
This sitemap is valid.

Related

In dita-ot is it possible to integrate into a feature extension for a specific transtype only?

Specifically, I have a custom dita-ot xhtml plugin which uses the <feature extension="dita.xsl.xhtml" file="xsl/header.xsl"/> to integrate into the xhtml pipeline. But this extension is used by the default xhtml output as well. I don't want this. Is there a way to run my extensions only for my own plugin?
A small example (brandheader example from the dita-ot documentation) which demonstrates the described behavior:
plugin.xml:
<?xml version="1.0" encoding="UTF-8"?>
<plugin id="com.example.brandheader">
<feature extension="ant.import" file="build.xml" />
<feature extension="dita.xsl.xhtml" file="xsl/header.xsl"/>
<transtype name="xhtml-extension" />
</plugin>
build.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project name="com.example.xhtml.extension" basedir=".">
<target name="dita2xhtml-extension" depends="dita2xhtml"/>
</project>
header.xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="gen-user-header">
<div>
<img src="https://www.dita-ot.org/images/dita-ot-logo.svg" alt="Example Company Banner"/>
</div>
</xsl:template>
</xsl:stylesheet>
The customized header appears for the xhtml transtype as well as for the xhtml-extension transtype.
I searched on stackoverflow for a similar question and I read the dita-ot developer documentation. But I couldn't find an option to enable the extension only for my plugin.
I am happy about any input.
Another option is to override the main XSLT used for processing in your custom XHTML plugin's build file:
<target name="dita2xhtml-custom"
depends="dita2xhtml-custom.init,
dita2xhtml"/>
<target name="dita2xhtml-custom.init">
<property name="args.xsl"
location="${dita.plugin.com.example.xhtml-custom.dir}/custom-main.xsl"/>
</target>
and your custom-main.xsl would import the xhtml XSLT stylesheet like:
<xsl:import href="plugin:org.dita.xhtml:xsl/dita2xhtml.xsl"/>
and add your own templates to the custom-main.xsl to override templates in the dita2xhtml.xsl.
Your "header.xsl" XSLT stylesheet will indeed be taken into account for any transformation type extended from the base XHTML one.
But what you could do would be to define in your plugin.xml an extension point with the name dita.conductor.xhtml.param:
https://www.dita-ot.org/dev/extension-points/all-extension-points.html#all-extension-points__dita.conductor.xhtml.param
Something like this:
<feature extension="dita.conductor.xhtml.param" value="params.xml" type="file"/>
and the params.xml file could contain:
Then in your XSLT stylesheet you define a global xsl:param named "TRANSTYPE" and you should receive on it the value of the transtype from the DITA OT build files, making it possible to take decisions in the custom XSLT templates based on the current transformation type.

Why Does This Sitemap Fail

I have tried just about everything I can think of and searched through here to no avail. Why does this feed seem to not work in Google Webmaster Tools:
https://www.campgroundreviews.com/sitemap
A truncated version of it is:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://www.campgroundreviews.com/sitemap/users/1</loc>
</sitemap>
<sitemap>
<loc>https://www.campgroundreviews.com/sitemap/users/2</loc>
</sitemap>
</sitemapindex>
And a truncated version of an individual sitemap (https://www.campgroundreviews.com/sitemap/cities/13):
<?xml version="1.0" encoding="UTF-8"?><urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>http://www.campgroundreviews.com/regions/california/twentynine-palms-marine-corps-ctr</loc>
<priority>0.8</priority>
<lastmod>2019-11-27T23:31:14+00:00</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.campgroundreviews.com/regions/california/travis-afb</loc>
<priority>0.8</priority>
<lastmod>2019-10-24T02:00:58+00:00</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.campgroundreviews.com/regions/california/yuba</loc>
<priority>0.8</priority>
<lastmod>2019-03-12T11:00:38+00:00</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
The content-type in the header is being returned as text/xml; charset=UTF-8.
In Google Webmaster Tools I get:
No URLs are ever discovered. It always says Sitemap is HTML but for the life of me, I cannot figure out why.
Any ideas?
In this particular case, this was NOT an issue with the sitemap itself. We were using prerender as per Google's recommendation ( https://developers.google.com/search/docs/guides/dynamic-rendering ), but I forgot to blacklist the sitemap URLs, so Webmaster Tools was viewing the maps via prerender.io instead of directly from the server.
Hopefully this helps somebody else out in the future.

TestNG error in Eclipse

Getting attribute parallel with value none must have a value from the list "false methods tests class" error on my XML in Eclipse. I am stuck because of this error.
Please help.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite Name" parallel="none">
I did try changing value of parallel to "false", however issue still occurs.
Changed code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite Name" parallel="false">
See this, i dont have any issue
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite" preserve-order="true" parallel="false">
<test name="Test1">
<classes>
<class name="com.test.Test1"/>
<class name="com.test.Test2"/>
</classes>
</test> <!-- Test -->
</suite> <!-- Suite -->
Just try by delete and typing again or you can use ctrl+space by typing few chars
Thank You,
Murali
Try with https, replacing "http://testng.org/testng-1.0.dtd" with "https://testng.org/testng-1.0.dtd"

JCR Node imported as nt:file when using content-package-maven-plugin

I created an OSGI config JCR node in XML within my Adobe CQ project under /apps/myproject/config/org.apache.sling.commons.log.LogManager.factory.config-MYPROJECT.xml
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root
xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OsgiConfig"
org.apache.sling.commons.log.level="Trace"
org.apache.sling.commons.log.file="logs/myproject.log"
org.apache.sling.commons.log.file.number="5"
org.apache.sling.commons.log.file.size="5MB"
org.apache.sling.commons.log.pattern="\{0,date,HH:mm:ss.SSS} *{4}* {3} {5}"
org.apache.sling.commons.log.names="[com.mycompany.myproject]" />
Problem is that when it gets imported into the JCR, it is showing up as an nt:file instead of what it should be according to its jcr:primaryType so that it look like this in CRXDE
when it should look like this
So my XML markup starts EXACTLY as follows:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root
xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
...
What I had done originally was to create a new xml file and put in my config. There are 2 other ways I know to create nodes
By doing it in CRXDE and then using vault to export
By doing it in Eclipse using the AEM developer tools (Eclipse plugin for Apache Sling)
In the case of a vault export, the XML starts like this:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" ...
and in the case of the plugin, it starts like this
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root
xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
...
but wait, you can't see it here, the plugin actually adds a friggin blank space right after jcr:root.
So whatever XML parser is acting on these XML files to create nodes in the JRC, it behaves oddly if there is no space right after the root node name. I'm on Windows, using Maven 3.2.3, using version 0.0.20 of content-package-maven-plugin, and AEM 5.6.1.
Please check your filter definition of the content-package-maven-plugin. If your filter root is set to
<filter>
<root>
/apps/myproject/config/org.apache.sling.commons.log.LogManager.factory.config-MYPROJECT.xml
</root>
</filter>
instead of
<filter>
<root>
/apps/myproject/config/org.apache.sling.commons.log.LogManager.factory.config-MYPROJECT
</root>
</filter>
then it will likely just put the file into your repository instead of creating the configuration node.
The latter one without .xml file extension is correct.
You need to add jcr:mixinTypes="[]" type as a property to your logger. So Your configuration will be like :
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:mixinTypes="[]"
jcr:primaryType="sling:OsgiConfig"
org.apache.sling.commons.log.level="Trace"
org.apache.sling.commons.log.file="logs/myproject.log"
org.apache.sling.commons.log.file.number="5"
org.apache.sling.commons.log.file.size="5MB"
org.apache.sling.commons.log.pattern="\{0,date,HH:mm:ss.SSS} *{4}* {3} {5}"
org.apache.sling.commons.log.names="[com.mycompany.myproject]" />
Hope this will help.

What are the steps needed in DITA-OT to pass ANT command line parameters to custom plugin's override XSLT-script

This question follows this: Is it possible to pass custom ANT parameters into custom plugin with DITA-OT?
I have plugin folder called: com.mymods.pdf under DITA-OT/plugins folder. Under is explained the structure and files shortly (follows this example closely http://dita-ot.github.io/1.8/readme/dita2pdf-customization.html). Plugin works but now I want to pass ANT command line parameters into mycustom.xsl:
com.mymods.pdf/
cfg/
common/
vars/
en.xml
fo/
attrs/
mycustom.xsl
xsl/
mycustom.xsl
catalog.xml
integrator.xml
plugin.xml
build_mymods_pdf_template.xml (dita2com.mymods.pdf.init target is here and it depends on dita2pdf2)
build.xml (<project><import file="build_mymods_pdf.xml"/></project>)
insertParameters.xml (see the linked question for contents)
So where I need to apply changes and/or add new files?
I use the plugin from other location with "mainANT.xml" which has target and transtype for using "dita2mymodsPDF".
plugin.xml code:
<?xml version='1.0' encoding='UTF-8'?>
<plugin id="com.mymods.pdf">
<require plugin="org.dita.pdf2" />
<feature extension="dita.conductor.transtype.check" value="com.mymods.pdf" />
<feature extension="dita.transtype.print" value="com.mymods.pdf" />
<feature extension="dita.conductor.target.relative" file="integrator.xml" />
<feature extension="dita.conductor.com.mymods.pdf.param" file="insertParameters.xml"/>
<extension-point id="dita.conductor.com.mymods.pdf.param" name="PDF XSLT parameters"/>
</plugin>
build_mymods_pdf_template.xml code:
<?xml version='1.0' encoding='UTF-8'?>
<project name="com.mymods.pdf" default="com.mymods.pdf">
<property name="transtype" value="com.mymods.pdf"/>
<target name="dita2com.mymods.pdf.init">
<property location="${dita.plugin.com.mymods.pdf.dir}/cfg" name="customization.dir" />
<property location="${dita.plugin.com.mymods.pdf.dir}/xsl/fo/topic2fo_shell_fop.xsl" name="args.xsl.pdf" />
<property name="args.chapter.layout" value="BASIC" />
<property name="args.bookmark.style" value="COLLAPSED" />
<!--property name="args.fo.include.rellinks" value="nofamily" /-->
</target>
<target depends="dita2com.mymods.pdf.init, dita2pdf2" name="dita2com.mymods.pdf" />
</project>
Also integrator.xml code:
<?xml version='1.0' encoding='UTF-8'?>
<project name="com.mymods.pdf">
<target name="dita2com.mymods.pdf.init">
<property location="${dita.plugin.com.mymods.pdf.dir}/cfg" name="customization.dir" />
<property location="${dita.plugin.com.mymods.pdf.dir}/xsl/fo/topic2fo_shell_fop.xsl" name="args.xsl.pdf" />
<property name="args.chapter.layout" value="BASIC" />
<property name="args.bookmark.style" value="COLLAPSED" />
<!--property name="args.fo.include.rellinks" value="nofamily" /-->
</target>
<target depends="dita2com.mymods.pdf.init, dita2pdf2" name="dita2com.mymods.pdf" />
</project>
Not totally sure whether integrator.xml or build_mymods_pdf_template.xml is like it actually should. But this fileset works and uses mycustom.xsl (other for attributes and other for XSLT overrides). Now the problem is that how to get my own custom ANT parameters so the plugin can see its value.
This is really easy for pdf2 plugin but still can't yet get it working inside my com.mymods.pdf . I think I don't need to post catalog.xml because it just tells where are "mycustom.xsl" files that are working properly.
Really easy way, not the cleanest way to do this is:
Note: This applies for DITA-OT 1.8.4 check suitability for other versions.
Create your custom PDF plugin as told in: http://dita-ot.github.io/1.8/readme/dita2pdf-customization.html
Create "insertParameters.xml" as in: http://dita-ot.github.io/1.8/dev_ref/plugin-xsltparams.html
In my case with following custom parameters:
<?xml version='1.0' encoding='UTF-8'?>
<dummy>
<!-- EXAMPLE: <param name="paramNameinXSLT" expression="${antProperty}" if="antProperty"/> -->
<param name="custom.data1" expression="${custom.data1}" if="custom.data1"/>
<param name="custom.data2" expression="${custom.data2}" if="custom.data2"/>
</dummy>
Now drop this "insertParameters.xml" into DITA-OT\plugins\org.dita.pdf2
Create processing to custom.xsl under xsl\custom.xsl.
Here is an example code snippet for custom.xsl
<?xml version='1.0' encoding='UTF-8'?>
<snippet>
<xsl:param name="custom.data1"/>
<xsl:param name="custom.data2"/>
<fo:block><xsl:value-of select="$custom.data1"/></fo:block>
<fo:block><xsl:value-of select="$custom.data2"/></fo:block>
</snippet>
Run integrator.xml to integrate changes into your DITA-OT.
Give in command line commands for running your PDF scenario like: "ant dita2mypdf -f -Dcustom.data1="myCustomParameter1value" -Dcustom.data2="myCustomParameter2value"
Run the process to create PDF and your parameters should be visible!
What this question was really intended to achieve to get a step by step instruction to set all these things to work 100% in the custom plugin that not a single thing needs to be added into DITA-OT default plugins (not even single file into pdf2 folder as in this solution). This could make updating DITA-OT remarkably easier for future.
The cleaner? alternative to this approach is
add a placeholder insertParameters.xml to the root of the DITA-OT 1.8.5. The file does not exist in the standard DITA-OT 1.8.5
<?xml version='1.0' encoding='UTF-8'?>
<dummy>
<param name="dummy" expression="{$dummy} if="dummy"/>
</dummy>
add the override insertParameters.xml to the root of your plugin
<?xml version='1.0' encoding='UTF-8'?>
<dummy>
<param name="my.runtime.parameter" expression="{$my.runtime.parameter} if="my.runtime.parameter"/>
</dummy>
Then run ant -f integrator.xml
Without knowing precisely which parameters you need to pass, it's difficult to answer this question. However, let's assume you're invoking this from the command line and you've defined a transtype of mymodspdf. The command would look like this:
ant -f build.xml -Dtranstype mymodspdf -Dmyparameter1 paramval1 -Dmyparameter2 paramval2
HTH,
Julio J. Vazquez
Write Spirit
http://www.writespiritservices.com