Re: validating xhtml entities
Dave Pawson <[email protected]>
| Newsgroups | gmane.emacs.nxml.general |
|---|---|
| Message-ID | <CAEncD4dgocH22-n3ebh3rtG-18xgPzp1snz1KmjVvc5RrKu-LA@mail.gmail.com> |
nxml is a tool for Relax NG Jesse? sort of not interested in DTD's? Try another tool for DTD validation, I use rxp http://www.cogsci.ed.ac.uk/~richard/rxp.html HTH On 18 May 2012 16:38, Jesse Alama <[email protected]> wrote: > I like the way that nXML mode validates my XML documents on the fly. > It seems that concerning entities, though, there can be false > negatives (i.e., nXML says that the document is valid, but it is not). > For example, in XHTML, one can write, say > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <title>An XHTML 1.0 Strict standard template</title> > </head> > <body> > <p> </p> > </body> > </html> > > and this document is (correctly) judged to be valid. Plugging in a > bogus entity > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <title>An XHTML 1.0 Strict standard template</title> > </head> > <body> > <p>&bogus;</p> > </body> > </html> > > is likewise judged to be valid, but this is not correct, at least > under the definition of "valid" that matters for my purposes (the > result needs to be valid XHTML -- validator.w3.org flags the bogus > entity as bad XHTML). > > To verify entities in XHTML, one could just scan the document, > comparing every entity occurring inside it against a fixed list of > acceptable XHTML entities. I would rather not code such a thing, > though, unless it's really necessary. Judging from the documenation > (in the "DTDs" section of the nXML info docs), I gather that indeed > nXML does not care to "validate" entities in the sense I intend. But > perhaps I'm wrong. > > Thanks, > > Jesse > > -- > Jesse Alama > http://centria.di.fct.unl.pt/~alama/ > > > ------------------------------------ > > Yahoo! Groups Links > > > -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ. http://www.dpawson.co.uk ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/emacs-nxml-mode/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/emacs-nxml-mode/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/