W3C home > Mailing lists > Public > www-style@w3.org > June 2013

CSS Namespaces, Content, Reference Combinators and the Styling of XML-Based Citations and References

From: Adam Sobieski <adamsobieski@hotmail.com>
Date: Sat, 29 Jun 2013 03:32:55 +0000
Message-ID: <BLU405-EAS2882683A0EA0088F7383D10C5770@phx.gbl>
To: "www-style@w3.org" <www-style@w3.org>
CSS Working Group,


Greetings.  The following discussion topics pertain to CSS namespaces, content, reference combinators and the styling of XML-based citations and references in documents as per document styles (http://en.wikipedia.org/wiki/Style_guide).


XML can describe or express functionality resembling LaTeX's \cite, \ref, \pageref and \label .  Topical is the styling of XML resembling:


<p>
  <span>In this sentence, a referenced material <ext:cite ...="#ref1"/> is cited.</span>
</p>


...


<section>
  <header>Bibliography</header>
  <ext:reference id="ref1" ...>
    ...
    <!-- biblio ontology, dublin core, etc -->
    <!-- http://www.w3.org/community/argumentation/wiki/Bibliographic_Formats -->
  </ext:reference>
</section>

 

 

A format() function can return a string from a format specifier and parameters.


<style title="document style">
@namespace ext ...


ext|cite::after { content: format("[<a xmlns='http://www.w3.org/1999/xhtml' href='{0}'>{1}</a>]", ..., ...) }
ext|reference { content: format("{0}. <i xmlns='http://www.w3.org/1999/xhtml'>{1}</i>. {2}, {3}.", ..., ..., ..., ...) }


@media print
{
  ext|cite::after { content: format('[{0}]', ...) }


  @page
  {


  }
}
</style>


An xml() function can differentiate text strings from XML:


<style title="document style">
@namespace ext ...


ext|cite::after { content: xml(format("[<a xmlns='http://www.w3.org/1999/xhtml' href='{0}'>{1}</a>]", ..., ...)) }
ext|reference { content: xml(format("{0}. <i xmlns='http://www.w3.org/1999/xhtml'>{1}</i>. {2}, {3}.", ..., ..., ..., ...)) }


@media print
{
  ext|cite::after { content: format("[{0}]", ...) }


  @page
  {


  }
}
</style>

 

 

Topical, then, would be syntax for the string formatting parameters, possibly utilizing existing CSS syntax and/or XPath syntax, with reference combinators, which would be expressive for indicating styled markup as per style guides from XML as indicated.


In addition to xml(), other hypotheses include link() and span() functions:


link(css_classes, url, content)
span(css_classes, content)


For example:


ext|cite::after { content: span('cite', format('[{0}]', link('citelink', format('#{0}', ...), format('{0}', ...)))) }


Which could describe content resembling: <span class="cite">[<a class="citelink" href="#...">...</a>]</span> .




Kind regards,


Adam Sobieski
Received on Saturday, 29 June 2013 03:33:30 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:12 UTC