Michael Glavassevich wrote:
[EMAIL PROTECTED] wrote on 09/04/2004 07:34:28 AM:

Hi,
I was wanting to continue writing xml documentation in which
the well-formedness constraint on internal general entities
does not result in a fatal error on parsing with the xerces XMLReader.
That constraint says that document structures must start and end within the same entity, whereas I would prefer, for legibility of the authoring process, to split the start and end tags of overly verbose
nested tags into two separate entities validated after the whole
document has been expanded.

What do I have to do to switch off this particular validation mechanism in xerces?

You cannot disable checking and error reporting for any of the well-formedness constraints. Well-formedness checking [1] is required by the XML spec. Violations of well-formedness constraints are fatal errors.


[1] http://www.w3.org/TR/2004/REC-xml-20040204/#sec-conformance

Michael is of course correct. A solution to Doug's problem might be to not split the start and end tags but rather turn the entire descendant content of that element into its own separate entity, keeping the start and end together as per the XML well-formedness requirement, while using a parameter entity switch in the internal subset to turn on or off expansion of a predefinition of the "overly verbose" entity, substituting an entity containing a short catch-phrase (e.g., "UNEXPANDED TEXT" or something akin), i.e., substituting a small phrase for a link to the real content. Then when you want the real thing, you just alter "INCLUDE" to "IGNORE" on the marked section. If you need examples of this kind of syntax, look inside pretty much any DTD (the modular XHTML DTDs have hundreds of them).

Not sure if this solves your problem exactly, but this is basically
how a similar problem is solved in industry (like in Sun's documenta-
tion department).

Murray

......................................................................
Murray Altheim                    http://kmi.open.ac.uk/people/murray/
Knowledge Media Institute
The Open University, Milton Keynes, Bucks, MK7 6AA, UK               .

  News Headlines from September 1st, 2004:

    Schwarzenegger cheers for Bush, says 'America is back'
    Bush reverses himself, says war on terror can be won

    At Least 900 Arrested in NY City as Protesters Clash With Police
    Talks to Disarm Rebel Shiites Collapses in Iraq
    Iraq assembly opens amid mortar fire
    Iraqi education official assassinated in Kirkuk
    Bomb did not hit Afghan villagers, says US
    One US soldier killed, two wounded by roadside bomb near Mosul
    US Army convoy ambushed near Balad
    Four Iraqis killed, seven wounded in mortar attack near Samarra
    Four Iraqis killed, five wounded in US airstrike near Samarra
    Three Iraqi policemen wounded in ambush near Kirkuk
    Fighting reported near Fallujah
    US troops under heavy mortar attack near Baquba
    Insurgent attacks near Basra stop oil exports
    US patrol ambushed near Mosul
    Twelve Nepalese hostages executed by insurgents
    Executions in Iraq trigger rioting in Nepal
    North Koreans storm Japanese school
    Hostage Crisis Unfolds in Russia as Guerrillas Seize School
    Moscow suicide bomber kills 10 and injures 51
    Bomb traces in both Russian jets
    UN says Sudan failing on Darfur
    2 suicide bombs kill 16 in Israel
    Israel vows 'global' war on Hamas
    Hundreds of Palestinians resume hunger strike in Israeli prison
    Three die in Saudi Ikea stampede
    Female GI in Iraq abuse case awaits judge's ruling
    High court scrutinizes Gov. Bush

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to