Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / May 2008



Tip: Looking for answers? Try searching our database.

Apple XSLT problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Aaron Gray - 26 May 2008 22:52 GMT
I am getting internal errors with Apples XSLT proceessing:-

[Session started at 2008-05-26 22:24:01 +0100.]
2008-05-26 22:24:30.223 RTF2XHTML Converter[1821] *** Assertion failure
in -[NSTextFieldCell _objectValue:forString:errorDescription:],
AppKit.subproj/NSCell.m:1298
2008-05-26 22:24:30.228 RTF2XHTML Converter[1821] Invalid parameter not
satisfying: aString != nil

NSError* err;

NSXMLDocument *xmlDoc = [[NSXMLDocument alloc] initWithXMLString: doc

                      options:(NSXMLNodePreserveWhitespace|NSXMLNodePreserveCDATA)

                      error:&err];

// Do XSL Transform

NSData *xslt = [NSData dataWithContentsOfFile: XSLTFile];

       NSXMLDocument *outDoc = (NSXMLDocument *)[xmlDoc
objectByApplyingXSLT: xslt arguments:nil error:&err];

The last statement is not returning so producing no error information in
err.

Am I doing something obvious wrong, AFAICS all the inputs are okay ?

Is Apples XSLT any good or should use xsltproc ?

Many thanks in advance,

Aaron
Gregory Weston - 27 May 2008 02:12 GMT
> I am getting internal errors with Apples XSLT proceessing:-
>
[quoted text clipped - 24 lines]
>
> Many thanks in advance,

There's no obvious relationship between the error you're seeing and the
code you've shown us.

I don't see anything wrong with that code. I somewhat doubt it's a data
error, but can't tell without seeing it. I think it's mostly likely
something else has gone insane before that point.

Signature

"Harry?" Ron's voice was a mere whisper. "Do you smell something ... burning?"
  - Harry Potter and the Odor of the Phoenix

Tom Harrington - 27 May 2008 16:08 GMT
> I am getting internal errors with Apples XSLT proceessing:-
>
[quoted text clipped - 4 lines]
> 2008-05-26 22:24:30.228 RTF2XHTML Converter[1821] Invalid parameter not
> satisfying: aString != nil

That error message has nothing to do with XSLT processing.  It's from an
NSTextField in your user interface.  The method name of
_objectValue:forString:errorDescription: isn't documented but it's
likely to be related to an NSFormatter attached to the text field (via
NSFormatter's getObjectValue:forString:errorDescription:).

The mention of the assertion comparing a string to nil suggests that
you're feeding bogus data into the cell, and the formatter is choking on
it.  That data might have come from your XSLT code, but that doesn't
necessarily mean it's the XSLT code that's broken.

Signature

Tom "Tom" Harrington
Independent Mac OS X developer since 2002
http://www.atomicbird.com/

Aaron Gray - 27 May 2008 20:22 GMT
>> I am getting internal errors with Apples XSLT proceessing:-
>>
[quoted text clipped - 15 lines]
> it.  That data might have come from your XSLT code, but that doesn't
> necessarily mean it's the XSLT code that's broken.

This is odd my user interface consists of four buttons that select source
files, XSLT file, destination folder, and a convert button.

I have put NSAlert's in the code and it definately occurs in the
objectByApplyingXSLT method call. And it does not return from that call.

I shall miss out that call and if it does the error still then probably
rebuild everything and see if it does it again, I suppose as I can not think
what else to do.

Aaron
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.