Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2006

Tip: Looking for answers? Try searching our database.

Applying CSS style to dynamically generated XML

Thread view: 
galpi@mail.com - 13 Aug 2006 20:36 GMT
Hi folks,

I'm working on a web application built with Tapestry. I trying to
generate XML dynamically, and apply CSS style to it. I'm able to
generate the XML document and return it to the browser, but I'm unable
to apply style, it seems it's unable to find the css stylesheet.

At the top of the generated XML doc I have :

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="./stylesheets/view.css" type="text/css"?>

If I save the document as an .xml file under the same directory where
./stylesheet lives and load it up in Firefox, it works. Do I need to
specify the fully qualified path ? I'd like to avoid that ...

I understand relative paths in the "href" are relative to the current
document, but what does it mean when the document is dynamically
generated and not saved as a file ?

many thanks,

galpi
Andrew Thompson - 13 Aug 2006 21:07 GMT
...
> <?xml version="1.0" encoding="UTF-8"?>
> <?xml-stylesheet href="./stylesheets/view.css" type="text/css"?>
>
> If I save the document as an .xml file under the same directory where
> ./stylesheet lives and load it up in Firefox, it works. Do I need to
> specify the fully qualified path ? I'd like to avoid that ...

I did'nt realise this was possible until you mentioned it,
but a little Googling suggests an embedded stylesheet
might be your best bet..
<http://www.w3.org/Style/styling-XML#Embedded>

HTH

Andrew T.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.