Please try this fix:

RCS file: /home/cvs/xml-xerces/c/src/internal/XMLScanner2.cpp,v
retrieving revision 1.77
diff -r1.77 XMLScanner2.cpp
398c398
<             if (attDefForWildCard && (wasAdded || (!wasAdded &&
attDef->getCreateReason() !=
XMLAttDef::JustFaultIn))) {
---
>             if (attDefForWildCard && (wasAdded || (!wasAdded &&
attDef->getCreateReason() ==
XMLAttDef::JustFaultIn))) {
721c721
<         if (type == XMLAttDef::CData)
---
>         if (type == XMLAttDef::CData || type > XMLAttDef::Notation)

Tinny

Neil Sherman wrote:

> I forgot to add that this only seems to occur if validation is taking
> place!  If the XML file is not validated then all attributes containing
> whitespace retain all of their whitespace.  However when validation is done
> all whitespace but that of the last attribute is stripped!
>
> On 21 December 2001 10:02, Neil Sherman [SMTP:[EMAIL PROTECTED]] wrote:
> > Hi all!
> >
> > I am trying to validate an XML document that contains attributes who have
> whitespace at the beginning.  It is important to retain the whitespace, for
> various checks later.
> >
> > I am basing my code on the DOMPRINT and DOMCOUNT examples.  When I run
> the DOMPRINT example on my XML document, it outputs the XML content as
> expected, however it strips the whitespace from all but the last occurence
> of the attribute with whitespace ??!!
> >
> > e.g.
> >
> > ....
> > <StopPointRef TimingPoint="0" ActivityFlag="Both"
> StopPointRefCode="AIMExtension" aim:AimStopPointRefCode="   10852"
> DynamicDestinationDisplay="">
> > </StopPointRef>
> > </TimingLink>
> > <TimingLink Distance="541" Direction="Outbound" HailAndRide="0"
> DefaultRunTime="2280">
> > <StoppingArrangements>
> >
> > </StoppingArrangements>
> > <StopPointRef TimingPoint="0" ActivityFlag="Both"
> StopPointRefCode="AIMExtension" aim:AimStopPointRefCode="   10852"
> DynamicDestinationDisplay="">
> > </StopPointRef>
> > <StopPointRef TimingPoint="0" ActivityFlag="Both"
> StopPointRefCode="TOA10122" DynamicDestinationDisplay="">
> > </StopPointRef>
> > ...
> >
> > results in
> >
> > ...
> > <StopPointRef TimingPoint="0" ActivityFlag="Both"
> StopPointRefCode="AIMExtension" aim:AimStopPointRefCode="10852"
> DynamicDestinationDisplay="">
> > </StopPointRef>
> > </TimingLink>
> > <TimingLink Distance="541" Direction="Outbound" HailAndRide="0"
> DefaultRunTime="2280">
> > <StoppingArrangements>
> >
> > </StoppingArrangements>
> > <StopPointRef TimingPoint="0" ActivityFlag="Both"
> StopPointRefCode="AIMExtension" aim:AimStopPointRefCode="   10852"
> DynamicDestinationDisplay="">
> > </StopPointRef>
> > <StopPointRef TimingPoint="0" ActivityFlag="Both"
> StopPointRefCode="TOA10122" DynamicDestinationDisplay="">
> > </StopPointRef>
> > ...
> >
> > NOTE: The value contained in aim:AimStopPointRefCode, has its whitespace
> stripped except in the last occurence.
> >
> > Why does this happen, even though they are the same attribute ??
> >
> > Many thanks for the help
> >
> > Neil
> >
> > PS: Attatched are:
> >
> > TMT21.xml     - My XML document
> > schema.xsd    - Main schema
> > aim.xsd               - Schema to extend the main schema
> >
> >  << File: TMT21.xml >>  << File: schema.xsd >>  << File: aim.xsd >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to