<root> element in XML pages - removable?
Options
Hello all,
I'm trying to create a page which can be used as a google sitemap. To match the xsd, the root of the document must be . The component is working just fine. However, when I put it on an XML page, there appears a element.
I understand why this might be necessary if you had multiple XML components. However, I see no way to get rid of this, or to change the qname of the element. I'm investigating possible fixes, here are the ideas, in order of desirability:
1) Make an XML fixed layout which specifies no root node.
2) Make an XML fixed layout which specifies a root node.
3) Use a post-controller to strip the erroneous root node (this feels hacky to me, but has been proposed as a possible fix).
4) Create a servlet-jsp pair to make the sitemap.xml (this is so far down the list in desirability that I'm willing to hack in every other way to avoid this - I can't afford to divorce this item from CCPro, as my SEO dept will be maintaining it, and I'm terrified of giving them any real back-end ownership).
Any help would be much appreciated!
I'm trying to create a page which can be used as a google sitemap. To match the xsd, the root of the document must be . The component is working just fine. However, when I put it on an XML page, there appears a element.
I understand why this might be necessary if you had multiple XML components. However, I see no way to get rid of this, or to change the qname of the element. I'm investigating possible fixes, here are the ideas, in order of desirability:
1) Make an XML fixed layout which specifies no root node.
2) Make an XML fixed layout which specifies a root node.
3) Use a post-controller to strip the erroneous root node (this feels hacky to me, but has been proposed as a possible fix).
4) Create a servlet-jsp pair to make the sitemap.xml (this is so far down the list in desirability that I'm willing to hack in every other way to avoid this - I can't afford to divorce this item from CCPro, as my SEO dept will be maintaining it, and I'm terrified of giving them any real back-end ownership).
Any help would be much appreciated!
0
Comments
-
Please learn how to format and Preview your posts to make sure that the information you're trying to present gets properly presented.Hello all,
I'm trying to create a page which can be used as a google sitemap. To match the xsd, the root of the document must be <urlset>. The component is working just fine. However, when I put it on an XML page, there appears a <root> element.
I understand why this might be necessary if you had multiple XML components. However, I see no way to get rid of this, or to change the qname of the element. I'm investigating possible fixes, here are the ideas, in order of desirability:
1) Make an XML fixed layout which specifies no root node.
2) Make an XML fixed layout which specifies a <urlset> root node.
3) Use a post-controller to strip the erroneous root node (this feels hacky to me, but has been proposed as a possible fix).
4) Create a servlet-jsp pair to make the sitemap.xml (this is so far down the list in desirability that I'm willing to hack in every other way to avoid this - I can't afford to divorce this item from CCPro, as my SEO dept will be maintaining it, and I'm terrified of giving them any real back-end ownership).
Any help would be much appreciated!
I've taken the liberty of fixing your post - but you shouldn't count on me (or anyone else) to do this all the time...0 -
I'm not sure what the question is...?
#1 probably isn't doable but it's worth a shot. #2 would be my answer, and it can be done.
Depending on your requirements, you could also consider just having your publishing process (workflow) generate/update and attach an actual sitemap.xml file. Then, you don't have to build whole new LiveSite pieces for something that's only used for this one specific case.0
Categories
- All Categories
- 109 Developer Announcements
- 49 Articles
- 100 General Questions
- 122 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 122 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
TeamSite Developer Resources
If you are interested in gaining full access to the content, you can register for a My Support account here.
- Docker Automation
- LiveSite Content Services (LSCS) REST API
- Single Page Application (SPA) Modules
- TeamSite Add-ons
If you are interested in gaining full access to the content, you can register for a My Support account here.