/    Sign up×
Community /Pin to ProfileBookmark

How to perform null XSLT translations

I am developing a large web application. I have developed my application architecture on MySQL, PHP, XSL and XHTML. I want to completely separate code from interface. I want my XSL solely responsible for displaying interface elements.

The problem is that if I do not have any XML to transform using the XSL I can’t just output the XSL into XHTML.

I don’t know if I’m explaining this right.

I know I can feed a dummy XML string into the processor, but that is not very elegant.

If there is no need for any dynamic translation, I want to return a default XSL translated into XHTML. Is there a way to do this?

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@crh3675Apr 11.2004 — You need to create a default.xml file for blank or empty data to pass fo your xsl file. I do a simliar sort of thing for a site that I am working on. There's no way around it as I know. It isn't necessarily an elegance issue, it's a functional issue and I don't see any problem with doing it that way.
×

Success!

Help @redijedi spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.23,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...