Answer the question
In order to leave comments, you need to log in
How to work with Atom.xml + XSL?
I want to process the Atom of a blog with Google Blogger using XSL. PHPShtorm highlights the "uri is not registered" error for the root element:
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss'
xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'>
<thr:total>0</thr:total>
<gd:extendedProperty name="commentSource" value="1"/>
<xsl:for-each select="//entry">
<xsl:sort order="descending" select="."/> йцукен
</xsl:for-each>
Answer the question
In order to leave comments, you need to log in
Eureka:
All the magic is in namespaces.
stole the solution from here
In xls, you need to explain what it is Atom and use its namespace
<?xml version="1.0" encoding="utf-8"?>
<x:stylesheet version="1.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:x="http://www.w3.org/1999/XSL/Transform">
<x:output
method="html"
media-type="text/html"
indent="yes"
encoding="UTF-8"/>
<x:template match="/atom:feed">
<x:text disable-output-escaping='yes'><!DOCTYPE html></x:text>
<html>
<head>
<title>DOCTYPE html 5</title>
</head>
<body>
<x:for-each select="atom:entry">
<x:sort order="descending" select="."/>
<h2>бла бла бла</h2>
Опубликовано: <x:value-of select="atom:published"/><br />
</x:for-each>
</body>
</html>
</x:template>
</x:stylesheet>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question