- markup (76)
- xml (11)
- xslt (23)
- pipelines (8)
- atom (9)
- overlapping markup (6)
- schema (11)
- creole (5)
- dtll (1)
- xforms (1)
- xpath (1)
- xquery (2)
- coding (2)
- datagovuk (2)
- genealogy (4)
- gridworks (1)
- hardware (1)
- linked data (18)
- modelling (1)
- named graphs (1)
- opendata (2)
- provenance (2)
- psi (4)
- skos (1)
- sparql (5)
- Talis (7)
- unicode (1)
- uri (4)
- versioning (1)
- visualisation (6)
- web (78)
- google (4)
- html5 (5)
- jQuery (2)
- rdf (46)
- ontologies (2)
- rdfa (8)
- rdfQuery (5)
- rest (6)
- wikis (1)
- work (4)
- legislation (3)
- xmlsummerschool09 (2)
- life (28)
- children (5)
- equality (6)
- gtd (1)
- environment (4)
- gadgets (5)
- software (3)
- xlinq (2)
- conferences (11)
- ukgc09 (1)
- xtech (9)
- xtech2008 (3)
- blog (8)
- drupal (3)
Comments
Re: MSXML serialisation of empty elements
I usually output a comment inside the element, which will come out as <a id=’foo’><!—empty—></a>
Re: MSXML serialisation of empty elements
Yes, good suggestion. When I proposed that to my client, they said they didn’t want the XHTML to be littered with comments. Sigh.
also causes problems with indentation
if uses the ‘indent’ option of the .net xslt engine, this often causes the document not to validate, because the schema doesn’t allow whitespace in the content of an empty element, but the indenter generates xml like this
and the whitespace is not stripped during input, since there are no contained elements.
Re: also causes problems with indentation
I haven’t experienced this, but I have experienced whitespace being added by MSXML when a PI was added within an element. Of course, you can’t use indent=”yes” when outputting XHTML using the xml method because it adds indentation even when it might effect rendering, so we avoid it.
Try adding a nbsp. :)
Try adding a nbsp. :)
Re: Try adding a nbsp. :)
But that changes the appearance of the document. I wondered if there was a good “no character” character that I could use between the tags… any suggestions?
Re: Try adding a nbsp. :)
I would have thought one of the Unicode zero-width non-breaking space characters would be appropriate.
Re: Try adding a nbsp. :)
Yes, I should have investigated. There are several possibilities:
In Firefox, at least in some fonts, you get funny characters with ZERO WIDTH NON-JOINER and ZERO WIDTH JOINER. In IE7, you also get funny characters when you use WORD JOINER. That leaves ZERO WIDTH SPACE or ZERO WIDTH NO-BREAK SPACE, but ZERO WIDTH NO-BREAK SPACE is deprecated since that codepoint is also used for the Byte Order Mark (BOM), so looks like ZERO WIDTH SPACE is the one to use.
To see for yourself, here are their names again, but with the spaces replaced by the respective character:
Just ID?
Hi,
if you just need an id in the document, why don't you just set it on the parent element, and don't include the anchor at all?
Best regards, Julian
Re: Just ID?
See my final disclaimer. I would never personally use
<a>elements to make anchors in an XHTML document. Sometimes my clients have different priorities.