Ian Bamsey wrote: > I am attempting to use XXE to edit XMI files. I am trying to write a > simple style sheet to explore the possibilities. > > I am having trouble selecting elements in the source file. Experiments > suggest this is because the XML has element names that include '.' > characters. Is there a way around this? > > Example of source XML: > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE XMI PUBLIC "-//XMLmind//DTD Example1//EN" > "http://www.xmlmind.com/public/dtd/example1.dtd"> > <XMI timestamp="Thu Feb 01 11:33:50 GMT 2007" xmi.version="1.1" > xmlns:UML="org.omg.xmi.namespace.UML"> > <XMI.header> > <XMI.documentation><XMI.exporter>Netbeans XMI > Writer</XMI.exporter> > <XMI.exporterVersion>1.0</XMI.exporterVersion></XMI.documentation> > </XMI.header> > </XMI> > > e.g. I would like to be able to select the XMI.header element: > > XMI.header:before { > display: block; > content: "Header"; > color: red; > } > > Can anyone please advice
In a CSS selector, "XMI.header" is a shorthand notation for "XMI[class=header]". See http://www.w3.org/TR/REC-CSS2/selector.html#class-html You need to escape the '.' using a '\'. Example: XMI\.header:before { display: block; content: "Header"; color: red; } See http://www.w3.org/TR/REC-CSS2/syndata.html#tokenization

