Template based XML generation is replaced with native XML

This commit is contained in:
Michael
2022-09-11 07:00:16 +00:00
parent 2123b4d071
commit ff89c1a8bf
9 changed files with 222 additions and 174 deletions
-32
View File
@@ -1,32 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
<Subject>{{$base}}</Subject>
<Property
type="http://www.oexchange.org/spec/0.8/prop/vendor">Friendica</Property>
<Property
type="http://www.oexchange.org/spec/0.8/prop/title">Friendica Social Network</Property>
<Property
type="http://www.oexchange.org/spec/0.8/prop/name">Friendica</Property>
<Property
type="http://www.oexchange.org/spec/0.8/prop/prompt">Send to Friendica</Property>
<Link
rel="icon"
href="{{$base}}/images/friendica-16.png"
type="image/png"
/>
<Link
rel="icon32"
href="{{$base}}/images/friendica-32.png"
type="image/png"
/>
<Link
rel= "http://www.oexchange.org/spec/0.8/rel/offer"
href="{{$base}}/oexchange"
type="text/html"
/>
</XRD>
-8
View File
@@ -1,8 +0,0 @@
<entry>
{{if $entry.id}}<id>{{$entry.id}}</id>{{/if}}
{{if $entry.displayName}}<displayName>{{$entry.displayName}}</displayName>{{/if}}
{{if $entry.preferredUsername}}<preferredUsername>{{$entry.preferredUsername}}</preferredUsername>{{/if}}
{{if $entry.urls}}{{foreach $entry.urls as $url}}<urls><value>{{$url.value}}</value><type>{{$url.type}}</type></urls>{{/foreach}}{{/if}}
{{if $entry.photos}}{{foreach $entry.photos as $photo}}<photos><value>{{$photo.value}}</value><type>{{$photo.type}}</type></photos>{{/foreach}}{{/if}}
</entry>
-18
View File
@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<response>
{{if $response.sorted}}<sorted>{{$response.sorted}}</sorted>{{/if}}
{{if $response.filtered}}<filtered>{{$response.filtered}}</filtered>{{/if}}
{{if $response.updatedSince}}<updatedSince>{{$response.updatedSince}}</updatedSince>{{/if}}
<startIndex>{{$response.startIndex}}</startIndex>
<itemsPerPage>{{$response.itemsPerPage}}</itemsPerPage>
<totalResults>{{$response.totalResults}}</totalResults>
{{if $response.totalResults}}
{{foreach $response.entry as $entry}}
{{include file="poco_entry_xml.tpl"}}
{{/foreach}}
{{else}}
<entry></entry>
{{/if}}
</response>
-17
View File
@@ -1,17 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'
xmlns:hm='http://host-meta.net/xrd/1.0'>
<hm:Host>{{$zhost}}</hm:Host>
<Link rel='lrdd' type='application/xrd+xml' template='{{$domain}}/xrd?uri={uri}' />
<Link rel='lrdd' type='application/json' template='{{$domain}}/.well-known/webfinger?resource={uri}' />
<Link rel='acct-mgmt' href='{{$domain}}/amcd' />
<Link rel='http://services.mozilla.com/amcd/0.1' href='{{$domain}}/amcd' />
<Link rel="http://oexchange.org/spec/0.8/rel/resident-target" type="application/xrd+xml"
href="{{$domain}}/oexchange/xrd" />
<Property xmlns:mk="http://salmon-protocol.org/ns/magic-key"
type="http://salmon-protocol.org/ns/magic-key"
mk:key_id="1">{{$bigkey}}</Property>
</XRD>
-39
View File
@@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
<Subject>{{$accturi}}</Subject>
<Alias>{{$profile_url}}</Alias>
<Alias>{{$alias}}</Alias>
<Link rel="http://purl.org/macgirvin/dfrn/1.0"
href="{{$profile_url}}" />
<Link rel="http://schemas.google.com/g/2010#updates-from"
type="application/atom+xml"
href="{{$atom}}" />
<Link rel="http://webfinger.net/rel/profile-page"
type="text/html"
href="{{$profile_url}}" />
<Link rel="http://microformats.org/profile/hcard"
type="text/html"
href="{{$hcard_url}}" />
<Link rel="http://portablecontacts.net/spec/1.0"
href="{{$poco_url}}" />
<Link rel="http://webfinger.net/rel/avatar"
type="{{$type}}"
href="{{$photo}}" />
<Link rel="http://joindiaspora.com/seed_location"
type="text/html"
href="{{$baseurl}}/" />
<Link rel="salmon"
href="{{$salmon}}" />
<Link rel="http://salmon-protocol.org/ns/salmon-replies"
href="{{$salmon}}" />
<Link rel="http://salmon-protocol.org/ns/salmon-mention"
href="{{$salmen}}" />
<Link rel="http://ostatus.org/schema/1.0/subscribe"
template="{{$subscribe}}" />
<Link rel="magic-public-key"
href="{{$modexp}}" />
<Link rel="http://purl.org/openwebauth/v1"
type="application/x-zot+json"
href="{{$openwebauth}}" />
</XRD>