Handle result of parse method

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22835 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2006-04-28 10:57:47 +00:00
parent 576fbc945e
commit c16a063c31
2 changed files with 25 additions and 13 deletions

View file

@ -1,6 +1,8 @@
2006-04-28 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSKeyedUnarchiver.m: Fix decoding of NSNull objects.
* Source/Additions/GSXML.m: Ensure that calls to parse documents
handle the success/failure value returned.
2006-04-27 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -23,7 +23,8 @@
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02111 USA.
<title>The XML and HTML parsing system</title>
<chapter>
@ -3861,13 +3862,18 @@ static BOOL warned = NO; if (warned == NO) { warned = YES; NSLog(@"WARNING, use
GSXMLParser *ssParser;
GSXMLDocument *ss;
newdoc = nil;
xmlParser = [GSXMLParser parserWithData: xmlData];
[xmlParser parse];
xml = [xmlParser document];
ssParser = [GSXMLParser parserWithData: xsltStylesheet];
[ssParser parse];
ss = [ssParser document];
newdoc = [xml xsltTransform: ss params: params];
if ([xmlParser parse] == YES)
{
xml = [xmlParser document];
ssParser = [GSXMLParser parserWithData: xsltStylesheet];
if ([ssParser parse] == YES)
{
ss = [ssParser document];
newdoc = [xml xsltTransform: ss params: params];
}
}
}
NS_HANDLER
{
@ -4961,9 +4967,11 @@ static void indentation(unsigned level, NSMutableString *str)
GSXMLDocument *doc = nil;
[parser substituteEntities: YES];
[parser parse];
doc = [parser document];
ctx = AUTORELEASE([[GSXPathContext alloc] initWithDocument: doc]);
if ([parser parse] == YES)
{
doc = [parser document];
ctx = AUTORELEASE([[GSXPathContext alloc] initWithDocument: doc]);
}
}
NS_HANDLER
{
@ -5032,9 +5040,11 @@ static void indentation(unsigned level, NSMutableString *str)
GSXMLDocument *doc = nil;
[parser substituteEntities: YES];
[parser parse];
doc = [parser document];
ctx = AUTORELEASE([[GSXPathContext alloc] initWithDocument: doc]);
if ([parser parse] == YES)
{
doc = [parser document];
ctx = AUTORELEASE([[GSXPathContext alloc] initWithDocument: doc]);
}
}
NS_HANDLER
{