XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] XML and CSS


On Nov 11, 2009, at 8:49 AM, David A. Lee wrote:

> I read this with interest, and IMHO the biggest thing "missing" is what I think is the fundamental issue of CSS for XML.
> That is you cant re-order the elements !   (Please tell me I'm wrong  .. but thats my understanding).
> 
> If pure CSS is used to render XML in the browser, then the resulting HTML HAS to be in the same basic structure as the XML.
> Simple case if I have
> 
> <part>
> <name>Name</name>
> <code>Code</code>
> </part>
> 
> 
> And I want it to render like
>     <P> <B>Code</B> - Name </P>
> 
> I don't believe there is any way to do this in CSS.

How about

part {
display: block;
}

name {
display:inline;
float: right;
}

code: {
display:inline;
float: left;
font-weight: bold;
}

untested :)

-Rob



> 
> 
> This, IMHO, is the fundamental limitation of CSS.  The XML has to be structured how you want it displayed, all the CSS can do is add some "styling" but it cant restructure the document.  One of the big "goals" of XML  (IMHO) is that it can be data centric, not display centric.  This makes CSS rendering a data oriented XML document severely crippled.  It can only do so much - namely add "style" to an element, not reformat the document.
> 
> (again, please tell me I'm wrong ! - but this is what the CSS gurus at work tell me as to why I cant send them XML directly to display in a mobile browser).
> 
> 
> David A. Lee
> dlee@calldei.com  http://www.calldei.com
> http://www.xmlsh.org
> 812-482-5224
> 
> 
> 
> Jesper Tverskov wrote:
>> To summarize the thread I have made a tutorial about it.
>> 
>> "Styling XML with CSS",
>> http://www.xmlplease.com/xmlcss
>> 
>> Cheers,
>> Jesper Tverskov
>> 
>> http://www.xmlkurser.dk
>> http://www.xmlplease.com
>> 
>> _______________________________________________________________________
>> 
>> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
>> to support XML implementation and development. To minimize
>> spam in the archives, you must subscribe before posting.
>> 
>> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
>> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
>> subscribe: xml-dev-subscribe@lists.xml.org
>> List archive: http://lists.xml.org/archives/xml-dev/
>> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>> 
> 
> _______________________________________________________________________
> 
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
> 
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
> 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS