[Jaba-devl] How should we use XSL-Based styling?
Status: Alpha
Brought to you by:
eoinlane
|
From: Alireza T. <a_t...@ya...> - 2001-08-12 10:25:29
|
Hi,
First I ask a question and then answer it,
please let me know your idea about my discussion.
Why we use XSL based Styling in this application?
and my answer:
1.Supporting multiple devices with writing multiple
XSLs for the same XML
2.we can later change aesthetics of our pages without
knowing about source code
and java programming experience and recompiling them.
But the question is that we have't reach to our second
goal,
if you care about the customer xml in the current
implementation:
<?xml version="1.0"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet
href="/stylesheet/form-html.xsl" type="text/xsl"?>
<?xml-stylesheet href="/stylesheet/form-wml.xsl"
type="text/xsl" media="wap"?>
<form>
<head>
<title>ABC Car Rental</title>
</head>
<input type="text" name="name" value="name1"
size="11"/>
<input type="text" name="address"
value="address1" size="11"/>
<input type="text" name="cardNum" value="1"
size="11"/>
<hidden version="1"/>
</form>
we see more presentation specific tags than data tags,
Why we Don't use the following form?
<?xml version="1.0"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet
href="/stylesheet/customer-reservecar-html.xsl"
type="text/xsl"?>
<?xml-stylesheet
href="/stylesheet/customer-reservecar-wml.xsl"
type="text/xsl" media="wap"?>
<customer>
<name>name1</name>
<address>address1</address>
<cardNum>1</cardNum>
</customer>
With this approach we can use our Xml data many times
and anywhere,
but with the current format we only use it in
reservation form,
I know that with this approach we should write two
html-wml xsl files for every xml data, but it worths.
with these new changes we also need to provide a
framework for mapping
styles to our data.
what's you idea?
Regards,
Alireza Taherkordi
__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/
|