Entrance Chat Gallery Guilds Search Everyone Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
February 22, 2026 - @435.38 (what is this?)
Activity rating: Three Stars Posts & Arts: 42/1k.beats ~ Boop! The forum will close in 565.beats! Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts Start New Topic  Submit Art
News: :4u: ~~~~~~~~~~~  :4u: Guild Events: There are no events!

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  RSS & xsl formating help needed


« previous next »
Pages: [1] Print
Author Topic: RSS & xsl formating help needed  (Read 49 times)
Skykristal
Sr. Member ⚓︎
****
View Profile WWWArt


I may be dead but I am here
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: skykristal
iMood: skykristal

Guild Memberships:
Artifacts:
Uni-StarGreat Posts PacmanFirst 1000 Members!Joined 2023!
« on: February 19, 2026 @665.35 »

Hey, I've been dealing with this for several weeks and I'm unable fix it myself

This is my issue (image below). My items are not properly formatted inside the xsl file/style. I have tried several formats in the xml itself too inculding CDATA and type="html"(I have that currently). I dont know what to put in the xsl file for it to display correctly.(which I assume is where the issue is) heres the feed itself https://skykristal.art/feed.xml


here's whats in the xsl file, I frankensteined what I saw in others source code and did reading but idk what I'm doing.
I put <p><xsl:value-of select="description" /></p> to display description but what else, what do I add or change here?


Code
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"
                xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
  <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
  <xsl:template match="/">
   <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
		<head>
                        <title>Skys RSS</title>
			<link rel="stylesheet" href="/feedstyle.css"/>
			<link rel="icon" type="image/x-icon" href="/images/rss.png"/>
				
		</head>
		
		<body class="body">
			<main class="card">
				<h1 class="maintitle">RSS by Skykristal</h1>
				<p>Site, Character, Art, and Blog updates! Welcome to my try and error RSS feed. Sub and get the latest updates!</p>
                                <p>Simply follow in your browser or paste this link into a reader! If you are unfamilar with RSS and Feed Readers, this <a href="https://rss.com/blog/how-do-rss-feeds-work/" target="_blank">article</a> might help! I personally use Capy Reader (android) for my feeds!</p>
				<div class="navi">
					<a href="javascript:history.back()">Back</a> |
					<a href="/Sitemap">Sitemap</a> |
					<a href="/index.html">Homepage</a>
				</div>
				<hr/>
				
				<h1 class="title">Recent Updates</h1>
				
				<xsl:for-each select="/rss/channel/item">
					<article class="">
						<h3 class="">
							<a target="_blank">
							<xsl:attribute name="href">
								<xsl:value-of select="link"/>
							</xsl:attribute>
							<xsl:value-of select="title"/>
							</a>
						</h3>
						<p class="date"><em><xsl:value-of select="pubDate" /></em></p>
                                              <p><xsl:value-of select="description" /></p>                                                
					</article>
					<hr/>
				 </xsl:for-each>
				
				
			
				
			</main>
		</body>
	
	
	</html>
	
</xsl:template>
</xsl:stylesheet>

« Last Edit: February 19, 2026 @808.50 by Skykristal » Logged


Read My Blog ⋆。°✩ Punch my OCs  ⋆。°✩ View my Gallery


Dan Q
Sr. Member ⚓︎
****
View Profile WWWArt


I have no idea what I am doing
⛺︎ My Room
RSS: RSS

Guild Memberships:
« Reply #1 on: February 19, 2026 @795.93 »

I'm not certain - my XSLT is rusty - but I think I understand what you're asking for... and I'm afraid it's probably not possible.

XSLT transforms XML into XML. Your HTML is not XML (unless you're writing XHTML, which you're not!). So there doesn't - can not - exist an XML representation of it.

Here's how I'd fix it:

1. In your XML feed, use XHTML, not HTML. The fundamental difference is that all tags must be "closed". So an image tag doesn't look like <img src="..." alt="...">, it looks like <img src="..." alt="..." />, and a
 looks like
. See how the tag has a "close self" slash at the end? That's the first thing you need (it's your
s that are affected.
2. Oh, and don't escape it! Escaping it makes it text. Same's true of a <![CDATA[ block if you were thinking of that. You need actual XHTML.
3. Now, in your XSLT, swap <xsl:value-of select="description" /> for <xsl:copy-of select="description"disable-output-escaping="yes" />. value-of shows the context of the text nodes within; copy-of copies the actual markup. Of course, this means your markup has to be valid XML, which is why you did steps 1 and 2.

I've tested that and it works for me. I don't do this, myself - too much work! - and instead just show a list of links, dates, and maybe some enclosures when I XSLT an RSS feed. But that's how you do it! Make sure you subscribe to your own RSS feed so you can see if you "break" it (it's very easy if you're having to remember to make everything valid XHTML!). (Another important XHTML rule is that you can't close an "outer" tag before an "inner" one, so no going <strong>...</strong>: they have to be closed in the reverse order that they were opened, every time!)

Finally: this may make RSS validators say your RSS is not perfectly-valid, because it uses tags that aren't part of the RSS spec! You might be able to get around this by adding the right xmlns:... to the header so say "XHTML tags are allowed too". But I wouldn't bother: so long as it works everywhere, who cares what a picky validator says?

Hope that helps: you're playing with black magic here! I've got to dash now but I'll check back in on this thread to see if it worked out for you.
Logged


Artifact Swap: PolyamorousI met Dan Q on Melonland!Joined 2025!Lurby
Skykristal
Sr. Member ⚓︎
****
View Profile WWWArt


I may be dead but I am here
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: skykristal
iMood: skykristal

Guild Memberships:
Artifacts:
Uni-StarGreat Posts PacmanFirst 1000 Members!Joined 2023!
« Reply #2 on: February 19, 2026 @805.35 »



Here's how I'd fix it:


Thank you so much for taking the time to answer me. I'll look into the things you've mentioned.  :smile:

Also to be clear about what I am trying to archive (links and formating properly displayed) this is what others are doing too. I used https://jadeeverstone.com/feed.xml and https://zhongvie.neocities.org/feed.xml for inspo and help with my own feed and they got it working just fine. what I'm trying to do is 100% possible I'm just... doing something wrong

edit: i managed to fix it. I messed up when I copied and edited the code I was using. missing code/script
« Last Edit: February 19, 2026 @833.41 by Skykristal » Logged


Read My Blog ⋆。°✩ Punch my OCs  ⋆。°✩ View my Gallery


Pages: [1] Print 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | ~ Send Feedback ~ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi