Hussein Shafie escribi?:
> Goh, Swee-Doon (GPMS) wrote:
>> I was trying to implement the XML tag view using the stylesheet. While I
>> could make them look close to what I need, it takes quite a bit of time.
>> I suspect there is generic stylesheet that can do this. Does this exist?
> [...]
> What is called a tag view is
> something different: it's a graphical view showing formatted blocks
> where start and end tags are depicted using nice, labeled, icons.
>
>> I like the tree view, and I?d like to
>> know if there is any possibility to support tag view as well.
>>
>> What would you suggest for the XML tag view?
Just a naive suggestion, that works for any document type:
------------------
* {
display: block;
margin-left: 1em;
}
*:before {
display: inline;
background-color: yellow;
content: xpath("name()") ">";
}
*:after {
display: inline;
background-color: yellow;
content: "<" xpath("name()");
}
------------------
You can add collapsers if you want, or use local-name() instead of
name() to get rid of namespace prefixes.
Hope this helps.
--
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado