sergei_dv

Hello,
1) I'm generating the XPS files with my own application. There are only images inside.
2)
To compress the XPS folder I'm using InfoZip library (it is verified and working fine even for very big XPS files) - I mean it is not the reason of my problem.
3) I'm using the template of folder and some files to generate new XPS
4) The next files are only modified by my program during generation:
FixedDocument.fdoc, #.fpage and #.fpage.rels
5) If I generate this XPS by hands - it can be opened well.

The problem is that the generated (by my program) file can not be opened by IE 7 with XPS viewer installed.

Below are the messages from the "More information" window of IE 7.


"System.Windows.Markup.XamlParseException: The 'EndValidation' method cannot not be called when all the elements have not been validated. 'ValidateEndElement' calls corresponding to 'ValidateElement' calls might be missing. Line '10' Position '1'. ---> System.InvalidOperationException: ..."
at System.Xml.Schema.XmlSchemaValidator.EndValidation()
at System.Xml.XsdValidatingReader.Read()
at System.Windows.Documents.XpsSchemaValidator.RootXMLNSAndUriValidatingXmlReader.Read()
at System.Windows.Markup.XamlReaderHelper.CompileBamlTag(XmlNodeType xmlNodeType, Boolean& endTagHasBeenRead)
at System.Windows.Markup.XamlReaderHelper.ReadElementNode()
at System.Windows.Markup.XamlReaderHelper.Read(XamlNode& xamlNode)
--- End of inner exception stack trace ---
...

Can anyone point me out to the reason of that exception
I will be very thankful!

Sergey.



Re: XML Paper Specification (XPS) The exception during opening the XPS file

adrian ford [MSFT]

Have you verified that the XPS files are valid XPS using isXPS (see http://msdn2.microsoft.com/en-us/library/aa348104.aspx)






Re: XML Paper Specification (XPS) The exception during opening the XPS file

sergei_dv

adrian ford [MSFT] wrote:
Have you verified that the XPS files are valid XPS using isXPS (see http://msdn2.microsoft.com/en-us/library/aa348104.aspx)

I thought about to verify it with the isXPS, but have never tried it before.

The OS I am using is XP, I will install Windows SDK for Vista and .Net Framework 3.0 and will try it today.

Thank you.