Home

Intel(R) XML Software Suite 1.2 for C/C++ User's Guide

image

Contents

1. Verify that your environment variables are configured to point to the correct locations For details on setting the required variables see Configuring the Intel XML Software Suite You can confirm the values for the path variables on the command line for example e On Linux OS echo LD_LIBRARY_PATH During compilation of an example header files are not found e Check that the example code has not been moved from the original location e Make sure that the install dir include folder contains all header files On Windows OS failed to start application because intel xss dll is not found 56 xss troubleshooting c2 html e Make sure that intel xss dll is in the same folder as the sample code e Check that you have installed the product as described in the Installation Guide On Linux OS during execution of the example the following error is produced libintel xss so Cannot open shared object file No such file or directory e Make sure that the Lb LIBRARY PATH variable holds the value install dir bin ia32 Or install dir bin intel64 depending on the platform e Make sure that install dir bin has all the files defined in README On Linux OS in Eclipse environment compilation or linking fails Please check that the include path and the library path are correctly set see Working With Eclipse IDE 57 Appendix A Acronyms and Definitions This section lists the acronyms
2. version in Mode Restrictions Standard XT XalanJ and XSLTC modes N A in the MSXML mode Allowed in Standard XT XalanJ and XSLTC modes Not allowed in the MSXML mode Not allowed with implementation defined behavior in the MSXML mode N A in other modes Appendix B Compatibility Modes Support for various Interpretations of XSL Conditions XSL Condition Unrecognized XSLT attribute on literal result element Invalid attribute value on XSLT instruction Specification Rules The literal result element has no attributes from the XSLT namespace The specification defines the value range or specifics of a certain attribute on an XSLT instruction Relax Rules MSXML mode an error occurs The attributes in XSLT namespace not defined in the specification are ignored in the MSXML mode In the MSXML mode an error occurs when xsl output method value is neither xml html text nor a valid QName xsl output standalone is not defined xsl output indent is not defined xsl template priority is an empty string xsl sort data type is neither a number nor a text xsl sort order is neither ascending nor descending Mode Restrictions Allowed in all modes Allowed with implementation defined behavior in Standard XT XalanJ and XSLTC modes Partially not allowed with implementation defined behavior in the MSXML mode See
3. 49 Intel R XML Software Suite for C C User s Guide 4 optional Compile the XPath expression Call the compile method of the XPath object to compile an XPath expression This method reads the supplied expression compiles it and produces a new XPathExpression object Once compiled the expression is maintained as an internal representation of instructions in an XPathExpression object 5 Evaluate the xpath expression You can invoke the evaluate methods in the XPathExpression class to evaluate a pre compiled XPath expression or the evaluate methods in the XPath class to evaluate a non compiled XPath expression directly These methods take a DOM node or a derived instance of Source StreamSource DOMSource SAXSource or XMLDocSource as input though only some of them are accepted by a specific object model The evaluate methods return XObject which describes the result of an XPath evaluation The XObject object contains the result of the type specified by the XPath expression but can implicitly convert it into a different type according to the XPath 1 0 recommendation 8 For example to convert the result node set into a string call getStringValue To get the evaluation results as a string you can also call the evaluateAsString methods Do not delete the XObject object or objects created from it 6 Recycle all objects created by the XPath object and the used memory by calling the purgeMemory m
4. SOURCE JESS CLINFILD IEIR S CPP CPP_PROJ SOURC Ea Create the Make target Right click the Makefile and choose Create Make Target Change the build command to nmake Run the Makefile Right click the Makefile and choose Build Make Target and choose the target you have set Getting Started Sample Applications The current distribution of the Intel XML Software Suite includes multiple source code examples that show how you can use the product with your application The examples are packaged with source files makefiles and sample input You can run the examples with the provided sample files or with your own files This topic lists the examples shipped with the current version of the product For detailed instructions on building and running each sample application please see the Samples Guide Samples are divided into several groups by the component they belong to For the Intel XML Parsing Accelerator DOMPrint Parses an XML document in DOM mode and serializes the DOM tree to standard output DOMTraverse Parses an XML document in DOM mode and traverses all nodes in the created DOM tree SAX2Print Parses an XML document in SAX mode and dumps the content to standard output XMLDocPrint Parses an XML document in XMLDocument mode and dumps the content to standard output ValidatingParser Parses an XML document with schema validation For the Intel XML Schema Accelerator SchemaVal
5. implementation 10 processor OASIS conformance test suite 6 for the Apache Xalan Java processor W3C XML Path Language XPath 1 0 8 Intel XML Schema Accelerator before passing data to the application Provides significant performance gains on the Intel Core i7 with the Intel SSE 4 2 Up to and above 1GB Operates with data Up to and above in the format of data 1GB streams DOM trees SAX events or XMLDocument Supports XSLT extensions including EXSLT extension functions 12 to allow applications to extend XSLT functionality Supports parallel transformation of an XML document with multiple threads Provides significant performance gains on the Intel Core i7 with the Intel SSE 4 2 Up to and above 1GB In the current version of the Intel XML Software Suite certain structures and methods are thread safe while others are not To ensure thread safety application Intel R XML Software Suite for C C User s Guide code must follow specific rules when using the library interfaces For example multiple threads cannot recursively call evaluate Tor one XPath or XPathExpression object because they are not thread safe or re entrant The general rule is that you can create and release instances of required objects from a shared factory in multiple threads However you can use the same instance of an object or configure a factory instance with setter methods in only one thr
6. 2 of the Validating Data section Enable schema validation by setting the Schema object into the parser via the setSchema method for example pssxParccscuUschemaWps r Initially the Schema object is set to NULL and setSchema changes it When a schema contains a non null value the Parser object uses the Validator object created from it to validate documents before passing information to the application When validation finds errors the Parser object handles them as if those errors were found by the Parser object itself In other words if the user specified ErrorHandler is set through setErrorHandler in SchemaFactory the errors will go to it To cancel validation in the next round of data parsing call setSchema 0 Parse your data with validation enabled Call the method parse of Parser to process the document For example pSaxPar parse xmlfile For details on the Intel XML Schema Accelerator specifics please see the Using the Intel XML Schema Accelerator section 30 Using the Intel XML Parsing Accelerator Configuring the Intel XML Parsing Accelerator User applications can register a custom entity resolver in SAX DOM or XMLDocument parser to resolve system identifiers and open connections to entities Entity Resolver This section uses the SAX parser as an example DOM and XMLDocument parsing have almost the same steps By default the Intel XML Parsing Accelerator resolves entities
7. Configuring the Intel XML Parsing Accelerator scene ee ee teense eeeeaeeeeeeaee 31 4 Using the Intel XML Schema Accelerator cesses nme 32 Validating Data D ER 32 Configuring the Intel XML Schema Accelerator nnne 36 5 Using the Intel XSLT Accelerator esses nensem menn 38 Performing the XSL Transformation EE 38 Customizing the Intel XSLT Accelerator ssssssesseseeeee nnne nemen nnns 40 lee TY POS EE 41 XSLT EXtOnSiONS isi MI 42 6 Using the Intel XPath Accelerator NEEN 49 Performing the XPath Evaluation EE 49 Configuring the Intel XPath Accelerator ccceeeeeeee eee ee tees ee ease eee eeeeaeeeaenes 52 7 Troubleshooting eerie Sigg RER HE mee E Eer EE 56 Appendix A Acronyms and Definitions esses 58 Appendix B Compatibility Modes Support for various Interpretations of XSL Conditions 59 Appendix References eei ets seeker inn REENEN SE KEES Ee 66 Index 1 Overview About This Document LJ Note This document describes the Intel XML Software Suite with an overview of its major features and a high level view of the API and intended usage With this document you will be able to e start using the Intel XML Software Suite e run the samples supplied with the package e employ advanced functionality of the libraries making up the suite e troubleshoot product related issues The document is targeted at developers that need to perform XML data processin
8. Handling By default the Intel XML Schema Accelerator handles errors in the following way void warning Exception amp ex void error Exception amp ex void fatalError SAXParseException ex Mi bool error const XMLChar err return true When you set an error handler errors found during parsing a schema or validating an XML document are first sent to the ErrorHandler object During schema parsing the function error Exception is invoked if the ErrorHandler object is registered The error Exception amp and bool error const XMLChar err error functions are invoked in validation run time The bool error const XMLChar err function can be used to make the validation stop or continue when an error occurs If FALSE is returned the validation stops If TRUE is returned the validation continues until a fatal error for example a parsing error You can specify your own error handler instead of the default one For that you need to define the following functions e void error Exception e void fatalError Exception e void warning Exception e bool error const XMLChar err Example 7 illustrates the procedure of setting a custom error handling behavior Example 7 Setting a Custom Error Handler 36 LJ note Using the Intel XML Schema Accelerator class CustomizedErrorHandler public ErrorHandler void warning Exceptio
9. Source in SAXResult during validation If the LL this method acts as For other Result object input it throws IllegalArgumentException LJ NOTE Forthe validate Source Result method the Source instance should match the Result instance doValidation Source validates the XML document The method accepts pointers to StreamSource SAXSource DOMSource XMLDocSource and Source as the input parameters It has the same functionality as validate Source The difference is that it returns false instead of throwing exception in case of error To view the error message use the get ErrorMessage method doValidation Source Result supports only SAXResult This method validates SAXSource and reports the events to the handlers registered in 33 Intel R XML Software Suite for C C User s Guide SAXResult during validation If the Result object is NULL this method acts as doValidation Source For other Result object input it returns false This method has the same functionality as validate Source Result The difference is that it returns false instead of throwing exception in case of an error To view the error message use the getErrorMessage method LJ NOTE It is recommended to use the doValidation methods They show better performance than the corresponding validate methods in validating invalid XML instances because the doValidation methods do not have to go through the exception hand
10. an XML File in SAX Mode Get a SAX parser factory SAXParserFactory saximpl SAXParserFactory newInstance Create SAXParser from the SAX parser factory SAXParser parser saximpl createSAXParser Create SAX2CoreDumper to dump XML events to XML content SAX2CoreDumper sax2CoreDumper fout Set SAX2CoreDumper as ContentHandler into SAXparser parser setContentHandler amp sax2CoreDumper Parse XML file through the file URI parser parse xmlFileName Release the SAXParser created by SAXFactory saximpl gt releaseSAXParser parser 26 Using the I ntel amp XML Parsing Accelerator Release the SAXParserFactory SAXParserFactory releaseInstance saximpl Parsing Data in DOM Mode Follow these steps to parse your input data in DOM mode 1 Get a DOM implementation factory object The system manages the DOM implementation factory for all DOMImplementation objects Call the newInstance method to create a DOM parser factory Get a DOM implementation object To conform to the DOM 2 0 Core standard 4 the Intel XML Parsing Accelerator provides another DOMImplementation class which is managed by DOMImplementationFactory Call the getDOMImplementation method to create a DOM implementation object Create the parser Call the method createDOMParser in the DOMImplementation class to get a new DOMParser object Perform the DOM parsing process Call the method pars
11. e Windows Server 2003 DataCenter e Windows Server 2003 Enterprise e Windows Server 2008 e Windows XP e Windows Vista LJ NOTE The Intel XML Software Suite achieves the best performance on the Intel architectures by using features of the Intel platforms and compiler tuning Additionally new software algorithms enable large performance gains on other platforms as well If you need support for the platforms not listed above send a request to xmlinfo intel com Major Features All libraries of the Intel XML Software Suite possess the following key features Intel R XML Software Suite for C C User s Guide Performance The libraries of the Intel XML Software Suite demonstrate high performance See the Intel XML Software Products web site 13 for details Portable and Platform Specific Performance the libraries making up the suite can use the available features of the underlying hardware platform On the Intel Core TM i7 with Intel Streaming SIMD Extensions 4 2 Intel SSE 4 2 that accelerate string and character processing or Intel platforms supporting multiple cores you can get significant performance gains without changing the software configuration The Intel SSE 4 2 use two forms of parallelism o performing operations on multiple 8 or 16 byte characters at a time using the Intel Architecture s 256 bit XMM registers o performing several operations concurrently on the array of characters Conform
12. issue number that enables you to track your issue e Getting Started Quick Start This section of the user guide explains how to quickly set up the library for use in your environment After installing the Intel XML Software Suite as described in the Installation Guide do the following 1 Check that the content of the installation directory matches the description in the README file If discrepancies occur consult the Troubleshooting section for recommendations on resolving the issue 2 Onthe Linux OS configure your environment settings by running configuration scripts from the installation dir tools directory 3 Check that your environment is set up correctly The environment variables should be set as shown in Table 3 Table 3 Environment Settings EI Variable Name Linux Windows Architecture IA 32 1 install dir install dir include Include install dir Bin ia32 install dir Lib ia32 iD LIBRARY PATH install_dir bin ia32 Intel 64 INCLUDE install_dir install_dir include Include Intel R XML Software Suite for C C User s Guide EI Variable Name Linux Windows Architecture install dir Bin intel64 LD LIBRARY PATH install dir bin intel64 install dir Lib intel64 After setting up the environment you are ready to start using the Intel XML Software Suite You can also adjust the product behavior by changing configuration settings see Configurin
13. oeren ox enee P Example 12 Sample XPath Evaluation with INTEL xwr pocuwENT MOSEL First get a XMLDocSource XMLDocFactory docFactory XMLDocFactory newInstance EE EE EE EE esee p XMLDocument xmldoc parser parse foo xml XMLDocSource xmldocSource xmldocSource setXMLDocument xmldoc Create an XPathFactory object supporting the INTEL XML DOCUMENT MODEL 51 Intel R XML Software Suite for C C User s Guide EES ERECTO XXe eXelc OXE S B e miei mee e XPATH INTEL XML DOCUMENT MODEL Create an XPath object XPath xpath xFactory newXPath Compile the XPath expression XPathExpression xPathExpression xpath gt compile a b c Evaluate it with a XMLDocSource XObject xObject xPathExpression evaluate amp xmldocSource Configuring the Intel XPath Accelerator You can employ a number of means to adjust operation of the Intel XPath Accelerator to your needs as follows e Check whether a certain object model is supported by the specific XPathFactory object Call isObjectModelSupported the object model can be DEFAULT OBJECT MODEL or INTEL XML DOCUMENT MODEL Table 5 defines available models and the types of input objects they support Table 5 Object Models of the I ntel amp XPath Accelerator Model Name DOMSource SAXSource StreamSource XMLDocSource DEFAULT_OBJECT_MODEL X X Uses DOM a
14. ont Append environment to native environment Replace native environment with specified environment 17 Intel R XML Software Suite for C C User s Guide 4 Import the source file to the project Right click the project and choose I mport File Edit Refactor Navigate Search Projec ri oo ARE S d Go Into e Je a Open in New Window L Create Make Target L Build Make Target Build Project Rebuild Project 5 Choose the example directory SchemaValidator from cpp gt examples gt xsa and then choose the files to import 18 Getting Started d 19 Intel R XML Software Suite for C C User s Guide SchemaValidator Overwrite existing resources without warning C Create complete folder structure Create selected folders only 6 Create a Makefile for the project and add the following contents to the Makefile 20 Getting Started Refer to MSDN for details of the format in this Makefile Create a new Make target Target Name m r Make Target Make Target fai m Build command Use default Bud Setting T Stop on First build error JV Run all project builders Create Cancel Create OUTDIR Debug NTDIR Debug Begin Custom Macros utDir Debug LL S OUTDIR SchemaValidator exe aL O End Custom Macros A e Qe
15. set or defined by the user Performing the XSL Transformation To transform your input data with the Intel XSLT Accelerator do the following 1 Instantiate a TransformFactory object To abstract your application from the internals of the transformer use the abstract TransformFactory class with a static newInstance method This method returns a handle to a specific object of the underlying TransformFactory implementation Compile the stylesheet Use the newTemplates Source xslSource method in the TransformFactory class to compile a stylesheet This method reads the supplied Source stylesheet compiles the stylesheet and produces a new Templates object Using the newTemplates method with no Source input produces a Templates object that creates transformers for identity transformation Identity transformation makes an exact copy of input to output but the data format can vary Once compiled the stylesheet is maintained as an internal representation of instructions and templates inside the Templates object The compilation of the stylesheet is done only once when the template is created You can supply the stylesheet in a stream of XML markup St reamSource in a DOM node DOMSource or SAX input SAXSource see CompileStylesheet in Sample Applications You can register your own extension functions and the function resolver and use your extension functions in the stylesheet see XSLT Extensions This function
16. that it encounters in XML data by the provided URL Many SAX applications will not need to customize their entity resolver but it will be especially useful for applications that build XML documents from databases or other specialized input sources or for applications that use URI types other than URLs If this is your case implement the EntityResolver interface and override the resolveEntity method class MyEntityResolver public EntityResolver resolveEntity your own implementation When customizing is finished register the entity resolver to a SAX parser before the parsing process MyEntityResolver myEntityResolver Saxparser setEntityResolver amp myEntityResolver Namespace Awareness By default the Intel XML Parsing Accelerator processes markup vocabularies with namespace aware enabled which conforms to W3C Namespaces in XML 1 0 Recommendation 2 For backward compatibility the Intel XML Parsing Accelerator provides switch and query interfaces to set and get namespace aware setting e setNamespaceAware bool namespaceAware configures the parser to enable or disable XML namespace aware By default the value of the parameter is set true e isNamespaceAware queries the status of the current setting on namespace awareness You need to enable namespace awareness before starting the parsing process 31 E Using the Intel XML Schema Accelerator The Intel XML Sche
17. the Relax Rules column for details 63 Intel R XML Software Suite for C C User s Guide XSL Condition xsl element name is not a QName Non white space texts in xsl attribute set Invalid pattern 64 Specification Rules If the string resulting from instantiating name attribute is not a QName an error occurs An XSLT processor may signal the error or recover by ignoring the element itself and instantiate its content XSLT instructions have restrictions on their contents If the pattern specified in the template is invalid an error occurs Relax Rules xsl sort case order is neither upper first nor lower first In other modes the attribute is not specified and the errors described above are ignored In the MSXML mode the XSLT processor signals an error In other modes it recovers In the MSXML mode an error occurs when xsl attribute set contains non white space texts In the MSXML mode the pattern error is checked statically If the pattern is invalid it Mode Restrictions Allowed in Standard XT XalanJ and XSLTC modes Not allowed in the MSXML mode Allowed in Standard XT XalanJ and XSLTC modes Not allowed in the MSXML mode Allowed in Standard XT XalanJ and XSLTC modes Not allowed in the MSXML mode Appendix B Compatibility Modes Support for various Interpretations of XSL Conditions XSL Condition Ou
18. threshold of memory usage to restrict the amount of system virtual memory consumed by the Intel XML Software Suite The default value is 512MB e Configure DocumentBuilderFactory to ignore all unsupported features and attributes By default DocumentBuilderFactory throws exceptions for unsupported features and attributes To ignore the unsupported features and attributes set the throw unknown feature value as false component name Intel XSLT Accelerator gt lt property name namespace prefix value false gt lt component gt e Configure parallel XSLT transformation to allow the Intel XSLT Accelerator to manipulate an XML document in multiple threads The value of this option must be an integer The default value is 0 so the feature is disabled a larger value enables parallel transformation and sets the number of maximum working threads However the Intel XSLT Accelerator can further adjust the maximum number of threads for instance if you set this option to 128 the Intel XSLT Accelerator may choose to create only 4 threads for optimal performance The settings in the configuration file can apply to all or specific components and have the following format lt property name name of property value current_value gt Component specific settings are inside respective component tags for example component name Intel XSLT Accelerator gt lt property name maximum memory value 512m gt 11 See al
19. ML Software Suite 1 components of cemere 1 featules c ege eh odin SEENEN 4 QUICK start escne rentre 9 Intel amp XPath Accelerator 2 Glen 24 USING eL 48 Intel XSLT Accelerator 2 Copflguring eee e ee ee ees 40 ln 24 HS 38 P Parsing See Intel XML Parsing Accelerator using n 2 S Samples erento niens 10 SAX simple API for XML 2 event ne EE 26 SAXPatFSQ ees ene in lene RA uidis 26 Chen ees eede gek AN ER ege 32 SchemaFactory ssssesssss 32 Simple API for XML See SAX 26 T Templates eene 38 Intel R XML Software Suite for C C User s Guide Transtormtactor 38 V valtdatton cence es 32 enabling eere 30 using See Intel XML Schema Accelerator eeeese 2 validator See Intel XML Schema Accelerator ccccccccceseeeeeeeeaes 2 X XML Suite See Intel XML Software SUltes reos studs deen dante inane tee nud 1 68 SM Document 2 e DEE 48 XPathFactory esses 48 XSL extensible stylesheet language ENEE AER 38 EXTENSIONS se 2 securesteri e retenta nt 42 EXSLT See EXST extensions 42 user defined extensions See user defined extensions 45 transformation eee 38
20. Mark The Journey Inside Viiv Inside vPro Inside VTune Xeon and Xeon Inside are trademarks of Intel Corporation in the U S and other countries Other names and brands may be claimed as the property of others Copyright 2007 2008 Intel Corporation All rights reserved Revision History Document Revision Description Revision Date Number Number 317576 002 Intel XML Software Suite 1 0 for C C December 2007 317576 004 Intel XML Software Suite 1 1 for C C August 2008 317576 Intel XML Software Suite 1 2 for C C October 2008 Table Of Contents 1 OVER VIO W ee diae a EAE Vast uec bd Eed 1 About This Document E 1 Product OVEFVIEW D d AE AEN E EE ve dd EE d ect A 1 Supported Environments oce inire eas pain rh numen ret REE AE ENEE TREE aE aa 3 Major ele Rc 3 Thread Sarety E a a a Ea AA REEE EEE Ea ARa Ea 5 Technical S ppOrt em 7 2 Getting Started WEE 9 ele dii de ien ran TA E NE ANE A O EEE ANNEE 9 Getting Version Information gv ENEE SSES EE raa EET ERARE 10 Configuring the Intel XML Software Gute 11 Working with the Intel XML Software Gute 12 Sample ee Le e 23 3 Using the Intel XML Parsing Accelerator mme 25 Parsing Data iri SAX Mode sese eise saa dE dee ve ra gere x Dua DERE Oe d eege 25 Parsing Data in DOM Mode ooo eer rennen o eme ttt e eife ERO rufa i etu 27 Parsing Data in XMLDocument Mode 28 Parsing Data with Schema Validation ccceccece cece eee eee eee ee eee nnnm 30
21. Suite for C C User s Guide 44 math atan2 math constant math cos math exp math highest math log math lowest math max math min math power math random math sin MEINE Ger math tan Sets functions allow you to manipulate node sets for example the set difference function gets nodes of two sets as arguments compares them and returns the difference between the two sets The current version of the Intel XSLT Accelerator supports all functions of this module as defined in the EXSLT resource 12 specifically set difference set distinct set has same nod set intersection set leading set trailing Strings functions are responsible for string manipulation for example the str tokenize function splits up a string and returns a node set of token elements each containing one token from the string The current version of the Intel XSLT Accelerator supports most functions of this module as defined in the EXSLT resource 12 specifically SEE Belli EE ons str padding EE str tokenize Using the Intel XSLT Accelerator The current version of the product does not implement the following EXSLT functions of this module str replace str encode uri and str decode uri The current version of the Intel XSLT Accelerator does not support the following EXSLT modules dynamic functions random and regular expressions LJ note The Intel XSLT Accelerator does not support alternative l
22. T Accelerator e Set an external URI resolver by using setURIResolver and getURIResolver functions see the API Reference in doc apidoc folder for details e Set output properties in the xsl output element of a stylesheet After a stylesheet is compiled the output properties that are specified in the XSLT stylesheet can be queried using the function getOutputProperties on the Templates or the Transformer object or getOutputProperty on the Transformer object You can override output property values when performing a transformation by calling functions setOutputProperty and setOutputProperties onthe Transformer object e Add parameters to your stylesheet during transformation For that the setParameter method of the Transformer object is used After setting a parameter you can retrieve it using the get Parameter function see StylesheetParameters in Sample Applications 40 Using the Intel XSLT Accelerator e Enable parallel transformation of an XML document by multiple threads For that change the XSLTParallelism setting in the config xml file as described in Configuring the Intel XML Software Suite e Set the mode property to specify the target behavior that Intel XSLT Accelerator conforms to You can choose between 5 modes Standard MSXML XALANJ XSLTC and XT The default value is Standard You can set this property as follows component name Intel XSLT Accelerator gt property name mo
23. ance and Compatibility The libraries of the Intel XML Software Suite conform to the following standards defining XML data processing o W3C XML 1 0 standard 1 o W3C Namespaces in XML 1 0 standard 2 except Qualified Names in Declarations o W3C DOM level 2 0 core standard 4 and partially DOM level 3 core with the limitations and specifics defined in the product Release Notes o SAX 2 0 specification 5 Core as defined in the product Release Notes In addition to these the components making up the suite possess a number of specific features as described in Table 1 Component Conformance Table 1 Component Specific Features Key characteristics Supported file size Intel XML Parsing Accelerator Operates with data in the format of data streams DOM trees SAX events or internal data streams Supports encodings UTF 8 UTF 16 UTF 32 ISO 8859 1 and ASCII Can enable validation of documents with the On a 32 bit system up to 20GB in SAX mode or 300MB in DOM mode ona 64 bit system up to 20GB in SAX mode or 600MB in DOM mode Overview Component Conformance Key characteristics Supported file size Intel XML Schema Accelerator Intel XSLT Accelerator Intel XPath Accelerator Thread Safety W3C XML Schema 1 0 standard 7 except PSVI post schema validation infoset W3C XSLT 1 0 standard 3 namespace declaration formats specific for the Apache Xalan XSLTC
24. anguage implementations of EXSLT functions For detailed instructions on how to use EXSLT functions see the EXSLT website 12 This section tells you how to call an EXSLT function Follow the steps below 1 Declare a namespace referring to the EXSLT module that contains the desired function For example to call a date and time function type xsl stylesheet version 1 0 xmlns xsl http www w3 0rg 1999 XSL Transform xmlns date http exslt org dates and times xsl stylesheet 2 Call the extension function in your templates For example get the year as a number type from the input string call the date year function in the following way lt xsl value of select date year gt LJ note By default the extension namespace is output into the result tree To prevent this specify the extension element prefixes attribute value with the module namespace prefix User Defined Extension Functions User defined extension functions enable you to augment transformations with custom functions Extension functions can operate with several XSLT and non XSLT object types as input arguments and return values For an example of a user defined extension function see UDF in Sample Applications You must organize your extension functions with a function resolver XSLT will consult the function resolver when it encounters an external function The function resolver identifies and returns the handle to the corresponding function implem
25. at you could wrap the function code into an XFunction object A sample XPathFunctionResolver for evaluating an XPath expression user maximum 3 4 could be the one shown in Example 15 Example 15 User defined XPath Function Resolver class MyFunction public XFunction publie bool evaluate const iutil XVector XObject amp argList XObject result The function implementation is here double dl argList 0 getNumberValue double d2 argList 1 getNumberValue result setNumberValue d1 gt d2 d1 d2 k class MyFunctionResolver public XFunctionResolver Static MyFunction myFunction jowlollsaie s 54 Using the Intel XPath Accelerator XFunction resolveFunction const XMLChar funcUri const XMLChar functionName int arity if stremp funcUri http user com 0 amp amp strcmp functionName maximum 0 return amp myFunction else return NULL 55 Troubleshooting This section lists errors that you might encounter and suggested solutions Failed to install with the error message This installer requires write privileges to the directory 1icense dir Please ensure that you have these rights Check that you have access to the directory where the installation script is trying to place the license e OnLinux OS intel licenses e On Windows OS c Program Files Common Files Intel Licenses Failed to launch the library
26. cess looks for a set of constraints in the attributes xsi schemaLocation or xsi noNamespaceSchemaLocation of the processed XML document LJ NOTE Specifying the location of the schema using the attributes xsi schemaLocation or xsi noNamespaceSchemaLocation is not recommended because these schema location hints can introduce a vulnerability to denial of service attacks 32 Using the Intel XML Schema Accelerator createSchema XMLChar systemId creates a Schema object according the systemrd parameter specified createSchema XMLChar systemId unsigned size creates a Schema object according to the systemId array values specified The Intel XML Schema Accelerator is responsible for creating a restriction set by combining the schemas pointed to by systemId array values o createSchema StreamSource streamSource creates a Schema object acco rding to the input stream source 3 Geta validator from the schema Create a Validator object via the createValidator method of the Schema object The Validator class provides the following methods for validating the XML document o validate Source accepts pointers to XMLDocSource and o validate Source validates the XML document The method StreamSource SAXSource DOMSource Source as the input parameters Result Supports only sAXResult The method validates sAxsource and reports the events to the handlers registered Result object is NU validate
27. clipse org downloads The source files used are copied from the schema validation sample in examples xsa SchemaValidator directory and are as follows e SchemaValidator h e SchemaValidator cpp e SAX2CoreDump h e SAX2CoreDump cpp In the screenshots all relevant settings are marked with red rectangles Follow these steps to start using the Intel XML Software Suite in Eclipse IDE with CDT 1 Create a C project and set the project type to executable This is a common step for all C projects 2 Add source files including CPP source files and header files C C CPPTestU SAX2CoreDumper h Eclipse Platform Die Edit Refactor Navigate Search Run Project Window Help jr Seege amp B H O Q IR Br IRS Project Explorer 23 EX Le SAX2CoreDumper cpp ifndef EXTERN HDR XML CONTENTHANDLER DUMPER H define EXTERN HDR XML CONTENTHANDLER DUMPER H include lt sstream gt include lt vector gt P F SAX2CoreDumper h include lt string gt b R SchemaValidator h include lt iostream gt include include common defines h b id SAX2CoreDumper cpp include include common types h include include common source h include include xpa sax saxattribute h include include xpa sax contenthandler h include include xpa sax dtdhandler include include xpa sax entityresolver h include include xpa sax lexicalhandler h include include xpa sax locator2 h b id SchemaVa
28. de value XALANJ lt component gt In this example the Intel XSLT Accelerator conforms to the Xalan J processor behavior Object Types Supported Object Types As shown in the transformation description XML processing can involve data streams DOM trees SAX events and the Intel proprietary format XMLDocument Each object type has its specifics in the transformation as described below Streams To create a StreamSource or a StreamResult object you can use a system ID which is a filename in the URI syntax or an object Reader for the source Writer for the result DOM Trees Your transformations can involve DOMSource and DOMResult objects These involve operations with a DOM document object model tree To transform your data into a DOM tree create a new DOMResult object or use DOMResult setNode to assign a new container SAX Events You can use SAX Simple API for XML events in your input data source stylesheet instructions or output In the transformation engine the SAXParser interface defines the parse method to produce SAX events When parse is called the parser 41 Intel R XML Software Suite for C C User s Guide invokes one of the callback handler methods in your application or in the transformer The SAX events are then handled by the callback handler XMLDocument You can use an XMLDocument object as input or output but not as a stylesheet source You can get an XMLDocument object from XMLDocRes
29. e ofthe DOMParser object to parse the XML source and create Document tree object Alternatively you can call another parse method providing a FileReader MemoryReader or another object inherited from the Reader object Release the objects involved in the parsing process Call the following methods of the DOMImplementation class a releaseDOMParser to release a DOMParser object b releaseDocument to release a Document object Example 3 illustrates the process of parsing XML data in the DOM mode Example 3 Parsing an XML file to a DOM Tree Get the DOM implementation factory DOMImplementationFactory domfactory DOMImplementationFactory newInstance 27 Intel R XML Software Suite for C C User s Guide Get DOMImplementation managed by DOMImplementationFactory do not release it DOMImplementation domimpl domfactory getDOMImplementation Create a DOMParser form DOM Implementation DOMParser parser domimpl createDOMParser Parse the XML file to a DOM tree through the file URI doc parser parse xmlFileName if doc zNULL domimpl releaseDocument doc Release the DOMParser created by DOMFactory domimpl releaseDOMParser parser Release DOMImplementationFactory DOMImplementationFactory releaseInstance domfactory You can further access and update the DOM tree created by DOMParser in Example 4 a new element with a local name e
30. ead For classes and methods not mentioned in this section assume that they are not thread safe Table 2 lists specific structures and methods grouped by their thread safety or unsafety The table refers to factory classes of the C API including factory classes that are responsible for specific objects as follows e DOMImplementationFactory creates DOMImplementation e SAXParserFactory creates SAXParser e SchemaFactory creates Schema e TransformFactory creates Templates e XMLDocFactory creates XMLDocParser and XMLDocWriter e XPathFactory creates XPath Table 2 Distribution of Thread Safe and Unsafe Classes and Methods Entity Thread safe Thread unsafe Classes e Schema DOMParser e Templates DOMWriter e DOMImplementation SAXParser XMLDocParser XMLDocWriter Transformer Validator XPath XPathExpression Instantiating methods of newInstance factory classes y releaseInstance Creator methods of factory getDOMImplementation classes createSAXParser Overview Thread safe Thread unsafe createXMLDocParser createXMLDocWriter createSchema newXPath newTemplates Releasing methods of leaseSAXParser factory classes 3 y leaseXMLDocParser leaseXMLDocWriter leaseSchema leaseXPath leaseTemplates For detailed class and function definitions see the API Reference shipped with the product Technical Support To receive technical support f
31. entation or 45 Intel R XML Software Suite for C C User s Guide NULL if it cannot find one During evaluation of the expression that contains the function the evaluate method of the returned function implementation will be called To use a custom extension function do the following l 46 Define your function Create your functions classes by inheriting the abstract class XFunction and implementing the evaluate method The evaluate method takes as arguments a list of input XObject object and an output XObject XObject can contain an XSL data type Boolean string number node set or a non XSL type For details on how to get the value of an XObject please see the API Reference in the doc apidoc folder Define the function resolver Create the resolver class inheriting the abstract XFunctionResolver class and implement its resolveFunction method This method takes the function URI name and arity as input and returns the needed XFunction implementation you previously defined To implement this method you can employ an algorithm such as looking up the function signature in the hash table In the current release no default function resolver is provided but you can use and modify the sample implementation in the UDF example in sample applications See a detailed definition of XFunctionResolver in the API Reference Example 10 illustrates function resolution with one external function valueOf that acce
32. er MemoryReader or another object inheriting from the Reader object 4 Release the objects involved in the parsing process Call the following methods of the XMLDocFactory class a releaseXMLDocParser to release an XMLDocParser object b releaseXMLDocument to release an XMLDocument object C releaseInstance to release the XMLDocFactory object Example 5 illustrates the process of parsing XML data in the XMLDocument mode Example 5 Parsing an XML Document in the XMLDocument mode Get the XMLDocument implementation factory XMLDocFactory docFactory XMLDocFactory newInstance Create XMLDocParser from XMLDocFactory PaMITII EE EE EEN e Parse the XML file to an XmlDcoument object through the file DIS doc parser parse xmlFileName Release the DOM tree created by DOMParser if doc NULL 29 Intel R XML Software Suite for C C User s Guide docFactory releaseXMLDocument doc Release the DOMParser created by DOMFactory docFactory releaseXMLDocParser parser Release XMLDocFactory XMInDOCHaceOrmyaneo eratsiestmisiram eee relate raa NT Parsing Data with Schema Validation The Intel XML Parsing Accelerator can operate in the non validating and validating modes Follow these steps to enable the Intel XML Parsing Accelerator with schema validation provided by the Intel XML Schema Accelerator 1 Implement a Schema object as described in steps 1 and
33. esses The mapping of a namespace prefix to a URI is provided by an object implementing the NamespaceContext interface You can set your derived NamespaceContext objects to XPath objects by calling the setNamespaceContext method Example 13 demonstrates setting the namespace prefix mapping through the getNamespaceURI method Example 13 User defined Namespace Context class MyNamespaceContext public NamespaceContext publie const XMLChar getNamespaceURI const XMLChar prefix iit Sicicema LEE ee Vues 0 1 recucm Himera wekese o CO p return NULL return empty string Variable Resolver When variables are used in an XPath expression the Intel XPath Accelerator needs to get the type and value of these variables You can implement an XPathVariableResolver object and set the object via set VariableResolver for these purposes Objects XPath and XPathFactory have this method If the XPathVariableResolver is set on XPathFactory all XPath objects constructed from this XPathFactory will use the specified XPathVariableResolver by default The Intel XPath Accelerator uses the XPathVariableResolver to retrieve the value of a user defined variable A value of a variable must not change during an evaluation operation The xPathvariableResolver interface provides method resolveVariable returning the variable value according to the input name For example if you want to evaluate an XPath express
34. ethod After this method all created XPathExpression XObject XMLDocNodeIterator DOMNodeIterator and their related objects no longer exist 7 Release the created XPath and xPathFactory object Call the releaseXPath method to release all XPath objects created from this XPathFactory object and then call releaseInstance to release XPathFactory The code in Example 11 shows how to evaluate a compiled XPath expression with a stream source and return a node set Example 11 Sample XPath Evaluation Create an XPathFactory object supporting the default object model MPSICMTACEOIY leen Ener ENEE e smewlinsicEmeS Qm Create an XPath object 50 Using the Intel XPath Accelerator XPath xPath xFactory newXPath Compile the XPath expression XPathExpression xPathExpression xpath compile a b c Evaluate it with a stream input source StreamSource inDoc foo xml XObject xObject xPathExpression evaluate amp inDoc Check the result type and value switch xObject getType case X DOMNODESET Iterate over the node set for DOMNodesetIterator it xObject getDbOMNodeIterator it amp amp Jubel pg sic Sinexac Ch 4 idom Node node it gt element break Gase Sas TRING case X_NUMBER case X_BOOLEAN break Release all XPath objects xPath purgeMemory xFactory releaseXPath xPath It E exe OI 8 s release
35. from a result tree fragment The Apache Xalan specific nodeset extension matching the EXSLT common node set function is also supported e Date and time functions handle operations related to date and time for example the date hour in day function returns the hour of the day as a number The current version of the Intel XSLT Accelerator supports all core functions and most other functions as defined in the EXSLT resource 12 specifically 42 Using the I ntel amp XSLT Accelerator date add date add duration date day abbreviation date day of week in month date day in month date day in week date day in year date day name date date date date time date difference date duration date hour in day date leap year date minute in hour date month abbreviation date month in year date month name date second in minut date seconds date sum date time date week in month date week in year date year The current version of the product does not implement the following EXSLT functions of this module date parse date date format date Math functions provide facilities for performing mathematical operations for example the math max function returns the maximum value of the nodes passed as the argument The current version of the Intel XSLT Accelerator supports all functions of this module as defined in the EXSLT resource 12 specifically math abs math acos math asin math atan 43 Intel R XML Software
36. g in their applications The document assumes knowledge of XML and C C programming skills When viewing this guide in PDF format your Adobe Reader viewer might generate hyperlinks from URL formatted text of the guide To disable this option modify your preferences to disable automatic hyperlink generation Product Overview The Intel XML Software Suite for C C is an XML processing library that you can use to perform parsing validation XPath search and XSLT transformation of the XML data used in your application The library implements a custom designed API that closely mirrors the JAXP 15 API used for XML processing in Java environments for functions where no standard C C processing API is available The API allows you to realize the best performing solution for your application without changing it This product provides rich industrial strength XML processing with exceptional performance Now you can obtain the best that the Intel architecture can offer and take advantage of such new features as the character and string processing instructions in the Intel Streaming SIMD Extensions 4 2 Intel SSE 4 2 and scalability across multiple cores The Intel XML Software Suite covers all major stages of XML data processing with each stage handled by separate components as follows Intel R XML Software Suite for C C User s Guide e The Intel XML Parsing Accelerator parses the data to a Simple API for XML SAX API i
37. g the Intel XML Software Suite Getting Version Information The Intel XML Software Suite enables you to get the library version information There are two methods defined in installation dir include common version h to get this information 1 getXSSVersion to obtain the XSSVersion structure which contains the version information 2 getXSSVersionString to extract a whole version description string The version structure is defined as follows typedef struct int MajorVersion lt The major number of the current library version Eege MinorVersion The minor number of the current library version SLIME PatchVersion lt The patch number of the current library version Zar BuildNumber The internal build number XMLChar Platform The platform which the Curreme J ees ise OF XSSVersion 10 Getting Started See also Version Query Samples Configuring the Intel XML Software Suite The file config xml which installs to installation dir conf enables you to control behavior of the Intel XML Software Suite For example you may want to increase or decrease the memory threshold to speed up data processing or to reduce memory consumption accordingly After successfully installing the Intel XML Software Suite you can delete re create or modify the configuration file as needed With the current version of the configuration file you can e Adjust the
38. hem The information here is subject to change without notice Do not finalize a design with this information The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published specifications Current characterized errata are available on request Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order Copies of documents which have an order number and are referenced in this document or other Intel literature may be obtained by calling 1 800 548 4725 or by visiting Intel s Web Site Intel processor numbers are not a measure of performance Processor numbers differentiate features within each processor family not across different processor families See http www intel com products processor number for details BunnyPeople Celeron Celeron Inside Centrino Centrino Atom Centrino Atom Inside Centrino Inside Centrino logo Core Inside FlashFile i960 InstantIP Intel Intel logo Intel386 Intel486 IntelDX2 IntelDX4 IntelSX2 Intel Atom Intel Atom Inside Intel Core Intel Inside Intel Inside logo Intel Leap ahead Intel Leap ahead logo Intel NetBurst Intel NetMerge Intel NetStructure Intel SingleDriver Intel SpeedStep Intel StrataFlash Intel Viiv Intel vPro Intel XScale Itanium Itanium Inside MCS MMX Oplus OverDrive PDCharm Pentium Pentium Inside skoool Sound
39. his section illustrates how to perform the XPath Evaluation with the Intel XPath Accelerator For details on setting up the Intel XPath Accelerator see Configuring the Intel XPath Accelerator To evaluate your input data with the Intel XPath Accelerator do the following 1 Instantiate an xPathFactory object Call static method newInstance of the XPathFactory class to get a pointer to the specific object of the underlying XPathFactory implementation Calling this method specify the object model Currently two object models are supported e XPATH_DEFAULT_OBJECT_MODEL uses DOM as internal representation with a limitation on the input file size e XPATH_INTEL_XML_DOCUMENT_MODEL accepts large files over 1GB An XPathFactory object and its derived XPath and XPathExpression objects can support only one object model once it is instantiated Calling this method without an argument is equivalent to calling newInstance ofthe XPATH DEFAULT OBJECT MODEL 2 optional Adjust the evaluation settings of the Intel XPath Accelerator 3 Instantiate an xPath object Call the newXPath method of the XPathFactory object to create an instance of the underlying XPath evaluator implementation An XPath object provides evaluate method series to evaluate given XPath expressions At this stage you can set the namespace context variable resolver and function resolver for this XPath object
40. idator Validates XML documents in the Stream SAX DOM or XMLDocument mode against the Schema XML documents For the Intel XSLT Accelerator SimpleTransform Performs stream to stream transformation for the specified xml and xs1 files MultipleTypeTransform Performs transformation with various input and output formats TransformChain Performs pipeline transformation using the Intel proprietary format XMLDocument as intermediate input and output StylesheetParameter Sets and gets stylesheet parameters see Configuring the 23 Intel R XML Software Suite for C C User s Guide CompileStylesheet Compiles the stylesheet supplied in various source formats Employs user defined extension functions in C during XSLT transformation Specifically the stylesheet in this example invokes the user defined valueOf functions For more information on using extensions with Intel XML Software Suite see XSLT Extensions Redirect Uses the Xalan specific redirect extension 9 The example shows that instead of writing the entire result of transformation into a single Result object you can divide the output into portions and write them to the specified files MultiThread Demonstrates transformation of input data in several threads For the Intel XPath Accelerator ApplyXPath Evaluates an XPath expression over an input XML source XPathVariable Evaluates an XPath expression with variables over an XML source XPathE
41. intel Intel XML Software Suite 1 2 for C C User s Guide Copyright 2007 2008 Intel Corporation All Rights Reserved Document Number 317576 005US Revision 1 5 World Wide Web http www intel com Document Number 317576 005US Disclaimer and Legal Information INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS NO LICENSE EXPRESS OR IMPLIED BY ESTOPPEL OR OTHERWISE TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT EXCEPT AS PROVIDED IN INTEL S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS INTEL ASSUMES NO LIABILITY WHATSOEVER AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY RELATING TO SALE AND OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE MERCHANTABILITY OR INFRINGEMENT OF ANY PATENT COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT UNLESS OTHERWISE AGREED IN WRITING BY INTEL THE INTEL PRODUCTS ARE NOT DESIGNED NOR INTENDED FOR ANY APPLICATION IN WHICH THE FAILURE OF THE INTEL PRODUCT COULD CREATE A SITUATION WHERE PERSONAL INJURY OR DEATH MAY OCCUR Intel may make changes to specifications and product descriptions at any time without notice Designers must not rely on the absence or characteristics of any features or instructions marked reserved or undefined Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to t
42. ion book name Svar you need to implement an XPathVariableResolver object from which the Svar can be retrieved The code in the Intel XPath Accelerator shows how to use user defined variables and the variable resolver The code in Example 14 shows how to use user defined variable resolver 53 Intel R XML Software Suite for C C User s Guide Example 14 Variable Resolver class MyVariableResolver public XPathVariableResolver mt les void resolveVariable const XMLChar varUri const XMLChar varName XObject result if strcemp varName var 0 result gt setStringValue Introduction to Algorithm Ie Function Resolver When user defined functions are used in an XPath expression the Intel XPath Accelerator needs to access the value returned by the function You can implement an XFunctionResolver object and set the object via setFunctionResolver for these purposes XPath and XPathFactory objects have this method If the XFunctionResolver is set on the XPathFacory all XPath objects constructed from this XPathFactory will use the specified XFunctionResolver by default The Intel XPath Accelerator uses the XFunctionResolver to retrieve the value of a user defined function The XFunctionResolver interface provides the resolveFunction method returning the XFunction object according to the input function name and its arity The XFunction object also requires you to provide the implementation so th
43. ject result Your implementation here return true class MyFunctionResolver public XFunctionResolver pubike XFunction resolveFunction const XMLChar funcUri const XMLChar functionName int arity if stremp funcUri http www abc com funcs amp amp strcmp functionName valueOf 0 amp amp arity 3 return amp _funcValueOf return NULL private MyValueOf funcValueOf 7 47 Intel R XML Software Suite for C C User s Guide Other Extensions This part groups any other extensions supported by the Intel XSLT Ac are not EXSLT or user defined extensions Redirect Extension celerator that This is an extension specific for Apache Xalan Java implementation 9 that enables you to redirect parts of the transformation output to one or more files You can see how this extension is used by running the Redirect application in the Examples directory For instructions on running this example see Sample Applications 48 6 Using the Intel XPath Accelerator The Intel XPath Accelerator for C C performs evaluation of XPath expressions against input data An XPath expression is similar to a path as in URL and can include expressions to manipulate strings numbers and Boolean values for example the expression book title author Charles Dickens finds the titles of books written by Charles Dickens in a given XML document Performing the XPath Evaluation T
44. le 1 Creating a New Handler for Data Processing class SAX2CoreDumper public ContentHandler Smile virtual void startNamespace unsigned int newNamespaceTag Follow these steps to parse your input data in SAX mode 1 Get a SAX parser factory object The Intel XML Parsing Accelerator maintains a SAX implementation factory for all SAXParser objects Call the newInstance method to create a SAX parser factory 2 Create the parser Call the method createSAXParser in the SAXParserFactory class to create a new SAXParser object 3 Register an event handler object 25 Intel R XML Software Suite for C C User s Guide The SAXParser class provides the method setContentHandler to register the user defined event handler object LJ NOTE A missing event handler raises an exception 4 Perform the SAX parsing process Call the parse method of the SAXParser instance to parse an XML source and execute all event actions on the inherited ContentHandler object Alternatively you can call another parse method providing a FileReader MemoryReader or another object inheriting from the Reader object 5 Release the objects involved in the parsing process Call the following methods of the SAXParserFactory class a releaseSAXParser to release a SAXParser object b releaseInstance to release a SAXParserFactory object Example 2 illustrates the process of parsing a document in the SAX mode Example 2 Parsing
45. lidator cpp using namespace std INTEL XML NAMESPACE USE INTEL XML UTIL NAMESPACE USE INTEL XML PARSE SAX NAMESPACE USE 3 Setthe include path to the CPP package install directory and the path to the current project 13 Intel R XML Software Suite for C C User s Guide For that go to C C Build gt Settings gt Tool Settings gt Directories gt Include paths and click the add icon to add the two paths one by one sl Properties for CPPTest Settings ey s Resource Builders Configuration Debus v Manage configurations Y C C Build Discovery options P Buld steps Puad anifact E Binary parsers Enor parsers Environment 7 include paths ADAGA Tool chain editor dB Preprocessor Variables lopt workspace CPPTest b C C General 3 Optimization Project References S Debugging Z Refactoring History ZS Wamings Run Debug Settings S Miscellaneous v GCC C Compiler S Preprocessor S Symbols S Directories Optimization Debugging 3 Waminas 4 Set the library path For that go to C C Build gt Settings gt GCC C Linker gt Libraries In the Library search path dialog click the add icon to add a new path Enter Value 1 JP hi v Libraries 4I type filter text Resource Builders V C C Build Discovery options Environment Settings Libraries Gi Teana Fits Ek Variables pinu P C C General Miscellane
46. ling process which is less efficient than the simple return false mechanism const XMLChar getErrorMessage returns the error message content if the doValidation method returns false This method does not return the error message if a validate method fails to validate the xml instance 4 Parse the document you need to check 5 Validate your data If the validate method is used and the source data is valid the component displays nothing Otherwise the Intel XML Schema Accelerator throws ValidationException or reports errors to the specified custom ErrorHandler If the doValidation method is used the Intel XML Schema Accelerator returns TRUE or FALSE to show whether the source data is valid or not To view error messages use getErrorMessage or the specified custom ErrorHandler The current version of the Intel XML Schema Accelerator does not support PSVI so the output is not accompanied by augmented information Example 6 illustrates how to check data with the Intel XML Schema Accelerator Example 6 Validation Procedure Get system managed schema implementation factory do not release it eleme enses Seenmaiaeis ey SchemaFactory newInstance http www w3 0rg 2001 XMLSchema Set the customized ErrorHandler and ResourceResolver if defined schemaFactory setErrorHandler customizedErrorHandler schemaFactory setResourceResolver cus
47. ma Accelerator for C C is responsible for verifying input XML data against a schema which is a set of constraints that can be checked or enforced against an XML document The Intel XML Schema Accelerator can be invoked by the Intel XML Parsing Accelerator when performing DOM and SAX parsing as described in section Using the Intel XML Parsing Accelerator Validating Data To run the Intel XML Schema Accelerator for C against your data do the following 1 Geta new SchemaFactory object using the newInstance XMLChar language method Application code must release the object after using it Method newInstance is thread safe it returns a new SchemaFactory object for every call However the SchemaFactory object is not thread safe because it provides set functions so that different threads can modify the properties of the same SchemaFactory object After obtaining the SchemaFactory object you can set customized ErrorHandler or ResourceResolver as described in the Configuring the Intel XML Schema Accelerator section If you do not set those options the Intel XML Schema Accelerator compiles the schema XML document with the default behavior 2 Load and compile the schema to be used The process of compiling a schema starts when you create it You can create a schema by calling one of the following methods of the SchemaFactory class o createSchema creates a special Schema object and during the validation pro
48. me as with two right curly braces If the offending node isa isa literal result element the node and its content are ignored in the MSXML mode In other modes Mode Restrictions Allowed in the XT mode only N A in other modes Allowed in all modes Allowed in the XT mode only N A in other modes Allowed with implementa tion defined behavior in the MSXML mode Partially allowed with Appendix B Compatibility Modes Support for various Interpretations of XSL Conditions XSL Condition Unrecognized top level XSLT instruction Unrecognized Specification Rules an error or recover by ignoring the offending nodes and their content Only the XSLT elements defined in the specification and elements with non null URI from other namespaces can be top level elements If an element in a Relax Rules an error occurs If the offending node is constructed using xsl element the element is converted to a text node with the string value of this element node This is relevant for all modes If xsl processing instruction contains top level XSLT instructions an error occurs in the MSXML mode In the MSXML mode an unrecognized top level XSLT instruction causes an error In other modes the unrecognized element is ignored In the modes other Mode Restrictions implementa tion defined behavior in Standard XT XalanJ and XSLTC modes See the Rela
49. mployeeld is created belonging to the test namespace and then appending the element to a document object Example 4 Editing a Document Object P EE GC SS rae Caile moce thar ig toe zo0t NEU ICI OS CN SO CUIU Goce Element docElem doc getDocumentElement I Create an eleme lee Element element doc createElementNS test employeeId Append th lement object as the last child of the root eene s Node appendedChild docElem appendChild element Parsing Data in XMLDocument Mode In the XMLDocument mode the Intel XML Parsing Accelerator uses XMLDocument an Intel proprietary compact description format of an XML document This format is an efficient intermediate XML data representation across different components of the Intel XML Software Suite 28 Using the Intel XML Parsing Accelerator Follow these steps to parse your input data in the XMLDocument mode 1 Get an XMLDocument parser factory object The system manages the XMLDocument parser factory for all XMLDocParser objects Call the getFactory method to get the handle to the factory 2 Create the parser The method createXMLDocParser in the XMLDocFactory class provides the new XMLDocParser object that you can use 3 Perform the parsing Call the method parse of the XMLDocParser to parse the XML source and creates an XMLDocument object Alternatively you can call another parse method providing a FileRead
50. n amp ex P void error Exception amp ex priimti sieClsioe W inltieisores Webs War ex getErrorMessage c str void fatalError Exception amp ex if bool error const XMLChar err Forinti steder see Welt Word ice p wee buen CELS With this approach the Intel XML Schema Accelerator does not distinguish warnings errors and fatal errors so that all errors are reported to ErrorHandler error External Resource Resolution By default the Intel XML Schema Accelerator resolves resources in the following way StreamSource resolveResource const XMLChar nameSpace const XMLChar resourceURI const XMLChar baseURT return NULL To redirect an included or imported file or the specified schema location you can define your own external resource resolver by using the ResourceResolver resolve function as shown in Example 8 Example 8 Setting a Custom Resource Resolver class CustomizedResourceResolver public ResourceResolver StreamSource resolveResource const XMLChar namespace const XMLChar resourceURI const XMLChar baseURI cedirect the resource URI to other places return NULL 37 5 Using the Intel XSLT Accelerator The Intel XSLT Accelerator for C C performs transformation of input XML data in a variety of formats employing the XSL language and the additional capability of XSLT extensions belonging to the EXSLT
51. n takes modes import precedence precedence causes an error N A in the MSXML mode Named A stylesheet with more More than one named Allowed in all template than one template template can have the modes override with the same name same name The last and import declaration takes 59 Intel R XML Software Suite for C C User s Guide XSL Condition Unknown variable Unknown named template Single right curly brace escape in AVT Complex content in comment PI and attribute construction 60 Specification Rules precedence causes an error A variable not declared in the scope causes a static error Unknown named template Using a single right curly brace outside the expression in AVT causes an error Use double left or right curly brace instead They are automatically replaced by a single curly brace If xsl processing instruction and xsl attribute create nodes other than text ones while instantiating the content of xsl comment an error occurs The XSLT processor may signal Relax Rules precedence You can use an undeclared variable if you skip static checking An error only occurs when the variable s value is explicitly used at run time You can use an undeclared named template if you skip static checking An error only occurs when the template is called during transformation You can use a single right curly brace outside the expression The result is the sa
52. ng Source and Result Types XSL transformation is illustrated by the SimpleTransform sample application that is supplied with the product see Sample Applications The step by step procedure for using the Transformer object to get a document object tree is illustrated in Example 9 Example 9 Using a Transformer to get a DOM Tree Generate a TransformFactory object Tan ee EE EE EI eene Tee EE HE d eoe nS eme 7 Compile the stylesheet obtain the Templates object StreamSource ss foo xsl Templates templates tFactory newTemplates amp ss Create the transformer Transformer transformer templates newTransformer 39 Intel R XML Software Suite for C C User s Guide Create Source and Result objects StreamSource inDoc foo xml DOMResult domResult Perform the transformation transformer transform amp inDoc amp domResult Now you can get the output Node from DOMResult Node node domResult getNode Release the transformer templates and factory templates releaseTransformer transformer tfactory gt releaseTemplates templates TransformFactory releaseInstance tfactory You can also use an extension function to redirect your output into one or more files see the Redirect Extension section Customizing the Intel XSLT Accelerator Use the following options to customize the operation of the Intel XSL
53. nterface a W3C Document Object Model DOM ora proprietary XMLDocument model o Simple API for XML SAX model represents data as a sequence of events o Document Object Model DOM model represents data as a node tree o XMLDocument represents data as an internal data stream for effective XML data processing in other components of the Intel XML Software Suite After the document is parsed the data can be further processed by other components in the library e The Intel XML Schema Accelerator validates an XML document against a specified W3C XML 7 schema document XML Schemas define a set of validation constraints which can be used to ensure that the XML data has the correct structure and values for your applications use e The Intel XSLT Accelerator transforms an XML document into another XML XHTML or text document by applying a W3C XSLT 1 0 stylesheet The stylesheet describes how to transform the input document to the output document format e The Intel XPath Accelerator navigates XML data by evaluating an XML path W3C XPath 8 expression over an XML document or a DOM tree The expressions return references to parts of the document or values extracted from the document for your application to use The Intel XML Software Suite can be plugged into different environments to accelerate XML processing for example e Enterprise service busses They introduce intermediaries between the client and the back end business ser
54. or the Intel XML Software Suite register for an Intel Premier Support account at the Registration Center To register for an account visit the Intel Registration Center web site If you have forgotten your password send a request to quadsupport mailbox intel com Please do not send your technical issue to this e mail address Additional information and support are available from the Intel Software Network XML User Forum and XML Software Blog To submit an issue via the Intel Premier Support web site do the following 1 Make sure that Java and JavaScript are enabled in your browser 2 Go to http premier intel com and log in 3 Submit your issue a Click Submit Issues in the left channel b Select the product type from the Product Type drop down menu For the Intel Software Products choose Development Environment tools SDV EAP as the product type Cc Select the product for which you want to submit the issue from the Product Name drop down menu Intel R XML Software Suite for C C User s Guide d Enter a headline type description of the problem or question in the I ssue Title text box e Enter a detailed question or a detailed problem description in the Question text box f Select Request Type from the drop down menu g To complete the submission process click Submit I ssue or Submit Issue Upload Files if you need to attach a file for example a test case or a screenshot You will get an
55. ous Project References BGCC C Compiler Refactoring History Preprocessor Run Debug Settings symbols Directories Library search path L xj 9 Si S Optimization opt intel xmlsoftwaresuite cpp bin ia32 S Debugging 9gVs _ lt S Warnings Miscellaneous v GCC C Linker General S Miscellaneous S Shared Library Settings 14 LJ note Getting Started The library name is intel xss the lib prefix and the so postfix are generated automatically 5 Right click the project and select Build configurations gt Build gt All to build the project by disclosure or delivery of the Materials either expressly by implication inducement estoppel or otherwise such intellectual property rights must be express and approved by Itel in writing Any license under EXTERN HDR XML CONTENTHANDLER DUMPER H EXTERN HDR XML CONTENTHANDLER DUMPER H Ksstream l include common defines h include common types h l include common source h Le Export include xpa sax saxattribute h include xpa sax contenthandler h include xpa sax dtdhandler h include xpa sax entityresolver h include xpa sax lexicalhandler h include xpa sax locator2 h ey Import Clean Project 2 Refresh F5 Close Project space std NAMESPACE USE UTIL NAMESPACE USE Build Configuratio Make targets Index Resou
56. pts three arguments with URI http www abc com funcs The example shows how to define this function and the function resolver Register your function resolver To register your function resolver use registerExternalFunctionResolver XFunctionResolver extFuncResolver method in the Templates class For Example 10 you can register your function in the following way MyFunctionResolver funcResolver templates gt registerExternalFunctionResolver amp funcResolver Declare the namespace for the function s for example xsl stylesheet version 1 0 xmlns xsl http www w3 0rg 1999 XSL Transform Using the Intel XSLT Accelerator xmlns my function http www abc com funcs The Intel XSLT Accelerator supports Apache Xalan specific namespace for the node set function You can declare the namespace xmlns xalan http xml apache org xalan and use the function xalan node set in your stylesheet see the Xalan website 9 for details 5 Call the extension function in your templates for example lt xsl variable name new pop select my function valueOf Hello name Welcome to Intel J note You can call an extension function inside another extension function both for user defined and for EXSLT extension functions Example 10 External Function Resolution Glass My Vya Meco aU CR Zommen Ze 4 j9xuileu stg bool evaluate const iutil XVector XObject 5 amp argumentList XOb
57. rase S INTDIR NSAX2CoreDumper obj Qerase S INTDIR SchemaValidator obj Qerase S INTDIR SchemaValidator exe erase S INTDIR SchemaValidator ilk Qerase S INTDIR SchemaValidator pdb Ulf COXOPIEIDY EIS A Let Mc Sage G OUMDIOR S QUE VW suele EE ENG CPP cl exe CPP PROJ nologo MTd W3 Gm GX ZI Od I S CPPAPT D WINS32 fo _DEBUEY D _CONSOmEY pD _IMBCS ies GUNIIDIRE NNU PHC S CUMIN NN fe eR Ze LINK32 link exe 21 Intel R XML Software Suite for C C User s Guide 22 LINK32 FLAGS intel xss lib kernel32 1lib iesus alg CCUIS2Z AWS WERS DOSa lado eme Der Late evehyejouS 2 lao aed 57 liio tere Lilo olestie gAs Laus mutt DS elle liio omgloScy32 lilo nologo subsystem console incremental yes pdb OUTDIR SchemaVal abigieng exe mell debug machine 1386 out OUTDIR SchemaValidator exe lib path CPPAPI N1ibNia32 LINK32 OBJS INTDIR NSchemaValidator obj S INTDIR NSAX2CoreDumper obj TES QUAND IR WeeloexnsedLxeleueoac eke 2 WS Gr DIGI JO 0 EE LINK32_OBJS S LINK32 lt lt S LINK32 FLAGS S LINK32 OBJS S cpp INTDIR 0bj S CPP lt lt CPP_PROJ lt SS SOURCE SAX2CoreDumper cpp S INTDIR SAX2CoreDumper obj SOURCE US COEINDIEIDEISD V S CPP S CPP PROJ SOURCE SOURCE SchemaValidator cpp S INTDIR SchemaValidator obj S
58. rce Path Convert To Manage Working in Eclipse IDE on the Windows OS This section illustrates how to use the Intel XML Software Suite in Eclipse IDE on the Windows XP operating system The steps on other Windows platforms are analogous The installation package of the Eclipse IDE and CDT used in this example is Eclipse 3 1 1 and CDT 3 0 2 In fact any combination of Eclipse IDE and CDT can work Here nmake is used and this tool is installed by default when Microsoft Visual Studio 2003 is installed In the screenshots all relevant settings are marked with the red rectangles To start using the Intel XML Software Suite in Eclipse IDE with CDT follow these steps 15 Intel R XML Software Suite for C C User s Guide 1 Goto Project gt and select Standard Make C Project as shown 2 Setthe project name and location 16 Getting Started 3 Setthe project properties Under Build command enter nmake Set an environment variable as CPPAPT New Project C Make Project Create a New C Project using make to build it p Environment used for make builder lc Projects Make Builder Environment tror Parsers Binary Parser Discovery Options C C Indexer Environment variables to set CPPAPI C Intel xmlsoftwaresuite cpp New Select Edit Edit Environment Variable Remove didi Name PPAPI CVIntelixmlsoftwaresuitelcpp Variables
59. re 5 Simple API for XML SAX http www saxproject org 6 W3C XML Conformance Test Suite http www w3 org XML Test 7 W3C XML Schema 1 0 http www w3 org TR xmlschema 1 http www w3 org TR xmlschema 2 8 W3C XPath 1 0 http www w3 org TR 1999 REC xpath 19991116 9 Apache Xalan Java transformer http xml apache org xalan j 10 Apache Xalan C transformer http xml apache org xalan c 11 OASIS XSLT Conformance test suite http www oasis open org committees documents php wg abbrev xslt 12 Extensions to XSLT http exslt org 13 Intel XML Software Products website www intel com software xml 14 Eclipse IDE http www eclipse org 15 Java API for XML Processing JAXP https jaxp dev java net 66 Index D DOM document object model 2 DOMParser eren nnn 27 E ErrorHandler sssseesssse 35 EXSLT evtensions eens 42 Gell le 42 Date and time NEEN 42 DC EE 43 SOUS H 43 lgl 44 external resources in schema validation 35 in XPath function resolver 52 namespace context 51 variable resolver 52 Intel XML Parsing Accelerator 2 Sample5 est eno beu e dina 23 Hl E 26 in DOM mode 27 in SAX mode 26 in XMLDocument mode 29 Intel XML Schema Accelerator 2 samples rere ntu 24 USING TRE 32 Intel X
60. registration scheme is similar to that of the Intel XPath Accelerator Your function will be visible in all the Transformer objects created from this Templates object For more details of extension function usage see XSLT Extensions Set up the transformer 38 Using the Intel XSLT Accelerator a Instantiate a Transformer object by using the newTransformer method in the Templates class This method returns an underlying implementation of the Transformer object b If needed configure the environmental settings for the transformer see Configuring the Intel XSLT Accelerator 4 Perform the transformation The transform method of the Transformer object works over the XML source and places output in a Result object Specifically for each node in the XML source the method does the following 1 Reads instructions in the Templates objects 2 Selects one of the following template options A template rule in the Templates object The default template rule as specified in the XSLT specification None The XML source can go in the form of a StreamSource DOMSource SAXSource or XMLDocSource object and the output can be a StreamResult DOMResult SAXResult or XMLDocResult object StreamSource DOMSource SAXSource and XMLDocSource classes are inherited from the abstract Source class and StreamResult DOMResult SAXResult and XMLDocResult classes are inherited from the abstract Result class For details see Usi
61. s the internal Converted to Converted to representation file size limited due DOMSource DOMSource to memory consumption of DOM tree INTEL XML DOCUMENT MODEL Accepts large files up to and over 1GB e Get and set the supported granularity features The Intel XPath Accelerator can support specific features which you can handle by calling getFeature and setFeature The string names of these features are predefined and in the current version only FEATURE SECURE PROCESSING is supported This feature sets all references to the external functions in an XPath expression return an error The default setting is FALSE e Set external resolvers for variables namespace prefixes and external functions 52 Using the Intel XPath Accelerator To specify a resolver for an element referred to by the evaluated XPath expression call setVariableResolver and setFunctionResolver before compiling and evaluating an XPath expression The resolvers set with these methods become the default resolvers for any XPath objects created from this XPathFactory object The variable resolver and function resolver can be set as properties of XPathFactory and XPath objects and the namespace context can only be set as property of XPath This section gives instructions on setting the resolvers and context Namespace Context When namespace prefixes are used in an XPath expression the prefixes need to be resolved to URI addr
62. so Intel R XML Software Suite for C C User s Guide lt component gt On startup the Intel XML Software Suite loads and parses config xml to get the settings If no correct value is found or if an error occurs the product uses the default built in value e Configuring the Intel XML Parsing Accelerator e Configuring the Intel XML Schema Accelerator e Configuring the Intel XSLT Accelerator e Configuring the Intel XPath Accelerator Working with the Intel XML Software Suite Working In Eclipse IDE See Also The Intel XML Software Suite for C C can be used in Eclipse IDE with C Development Tooling CDT plug ins on Linux and Windows IA 32 and Intel 64 architectures Prerequisites To start using the Intel XML Software Suite in Eclipse IDE install the following components For the Windows OS e Eclipse IDE 3 1 1 e CDT 3 0 2 plug in For the Linux OS e Eclipse IDE 3 3 2 e CDT 4 0 plug in Working in Eclipse IDE on the Linux OS Working in Eclipse IDE on the Windows OS 12 Getting Started Working in Eclipse IDE on the Linux OS This section gives step by step instructions on how to use the Intel XML Software Suite with Eclipse IDE on Linux IA 32 architecture The steps are analogous for the Intel 64 architecture The installation package of the Eclipse IDE and CDT used in this example is eclipse cpp europa winter linux gtk tar gz You can download it from http www e
63. tomizedResouceResolver 34 Using the Intel XML Schema Accelerator Enable the full checking for schema file and this is time consuming SchemaFactory setFeature http xml intel com validator schema full checking e ERE P Create a Schema object from SchemaFactory Schema schema NULL try schema schemaFactory createSchema schemavalidator xsd catch ValidationException Seil handle the errors of schema compiling Validator validator schema gt createValidator Specify the input StreamSource in the example StreamSource streamSource schemavalidator xml bool result validator doValidation amp streamSource abit CU secexsiatbue handle the error printf sWNn validator getErrorMessage the validate method can also be used as the following code CENA validator gt validate amp streamSource catch ValidationException Seil handle the errors of validation SC Release the Validator object created by Schema Schema releaseValidator validator Release the Schema object created by SchemaFactory 35 Intel R XML Software Suite for C C User s Guide SchemaFactory releaseSchema schema SchemaFactory releaseInstance schemaFactory Configuring the Intel XML Schema Accelerator User applications can employ several means of adjusting the validation process as follows Error
64. tput Namespace Alias stylesheet prefix Nested comment Undefined key Specification Rules Undefined in the specification XML specification does not allow nested comments Undefined in the specification Relax Rules processor signals an error In other modes the behavior is undefined The namespace specified as the stylesheet prefix can be the output in all the modes except for the MSXML mode In the MSXML mode comments such as lt lt abc gt gt do not cause an error In the MSXML mode using an undefined key does not cause an error In other modes it returns an empty nodeset Mode Restrictions Allowed in Standard XT XalanJ and XSLTC modes Not allowed in the MSXML mode Allowed in the MSXML mode N A in other modes Allowed in the Standard XT XalanJ and XSLTC modes Not allowed in the MSXML mode 65 Appendix C References This section lists reference to relevant external documents referenced in the current document 1 W3C XML 1 0 Recommendation http www w3 org TR xml 2 W3C Namespaces in XML 1 0 Recommendation http www w3 org TR 2006 REC xml names 20060816 3 W3C XSLT 1 0 Recommendation http www w3 org TR 1999 REC xsIt 19991116 html 4 W3C Document Object Model DOM Level 2 Core Specification http www w3 org TR DOM Level 2 Core Level 3 http www w3 org TR DOM Level 3 Co
65. ult and set it as XMLDocSource for another transformer Usually transforming input XMLDocument is faster than other source types Therefore using XMLDocument as an intermediate result in multiple or pipelined transformations may accelerate the process For an example of such a transformation see the example TransformChain XSLT Extensions You can expand the functionality of XSLT transformations through the use of XSLT extensions An extension can be a function or an element The Intel XSLT Accelerator component provides a subset extensions functions or elements as defined by the EXSLT community project 12 Further in the document these functions are referred to as EXSLT extensions Extensions can also be user defined that is provided by the end user code These are limited to extension functions The Intel XSLT Accelerator supports user defined extension functions implemented in the C programming language Specifically an extension function is an evaluate function of a C class that is invoked during the execution of an XSLT transformation This section provides an overview of supported extensions and their usage EXSLT Extensions The current version of the Intel XSLT Accelerator supports EXSLT extensions grouped into the following modules e Common functions cover the basic operations in the current version the Intel XSLT Accelerator supports only one function of this group common node set Which returns a node set
66. used throughout the document with their definitions Table 6 Acronyms Used in this Document Acronym Definition Simple API for XML Transformation API for XML Processing 58 Appendix B Compatibility Modes Support for various Interpretations of XSL Conditions This section provides details on the Intel XSLT Accelerator compatibility modes Standard XT MSXML Xalan and XSLTC These modes allow you to simulate different XSL behavioral interpretation of third party XSLT processors such as Saxon MSXML Xalan XT and XSLTC You can switch the compatibility mode on and off by setting property parameters in the config xml configuration file located in installation directory gt conf directory Table 6 Compatibility Modes Support for various I nterpretations of XSL Conditions XSL Specification Relax Rules Mode Condition Rules Restrictions Local variable Two variables or A local variable inside Allowed in all override parameters with the the scope of another modes Standard same name inside a local variable can have XT Xalan MSXML template cause an the same name In this and XSLTC error case the inner variable shadows the outer variable the outer variable retains its value Global A stylesheet with more You can declare a Allowed in the variable than one binding ofa global variable more Standard XT override global variable with than once The last XalanJ and XSLTC the same name and declaratio
67. vice that may parse the XML data passed in validate that it conforms to a schema perform an XSLT transformation to change and augment its format and extract routing information using XPath e Application servers They may provide web services stacks perform data mashups and much more In web services stacks messages may be parsed validated and transformed The Intel XML Software Suite offers various interfaces to the underlying XML data representation providing functionality for SAX StAX or DOM parsing schema or DTD validation XSLT transformation and XPath expression evaluation It is recommended to use the suite for all the functions required instead of combining functional elements with other implementations This can result in significantly greater efficiency gains Overview Supported Environments The Intel XML Software Suite for C C is supported on Windows and Linux operating systems on IA 32 and Intel 64 architectures The following list includes the operating systems supported in this release e The Linux OS e Red Hatt Enterprise Linux Server and Advanced Platform 5 0 e Red Hatt Enterprise Linux AS 4 0 2 6 kernel e Red Hatt Enterprise Linux ES 4 0 2 6 kernel e Red Hatt Enterprise Linux AS 3 0 2 4 kernel e Red Hatt Enterprise Linux ES 3 0 2 4 kernel e SUSE Linux Enterprise Server 10 2 6 kernel e SUSE Linux Enterprise Server 9 2 6 kernel e The Windows OS e Windows Server 2003 Standard
68. x Rules column for details Not allowed in the MSXML mode Allowed in Standard XT XalanJ and XSLTC modes Not allowed in 61 Intel R XML Software Suite for C C User s Guide XSL Condition local XSLT instruction with forward compatibility Invalid top level element Unrecognized attribute on XSLT instruction 62 Specification Rules template is processed in forwards compatible mode with version gt 1 0 and XSLT 1 0 does not allow to initiate such elements XSLT performs fallback Only the XSLT elements defined in the specification and elements with non null URI from other namespaces can be top level elements An XSLT instruction may have attributes not from other namespaces if the expand name of the attribute has a non null namespace URI Attributes with null namespace URI for example attributes with unprefixed names not defined in the specification cause an error for an XSLT instruction Relax Rules than MSXML an element not allowed in XSLT 1 0 causes an error if initiated at run time In the MSXML mode a top level element outside the XSLT namespace with null URI causes an error In other modes the element is ignored If xsl comment has any attribute in the MSXML mode with both null and non null URI an error occurs If xsl stylesheet or xsl transform has an attribute xsl version instead of
69. xternalFunction Evaluates an XPath expression referring to an external function over a pre built DOM tree Version Query Samples VersionQuery Gets the Intel XML Software Suite version information as structure or string description Multi component Samples BookStore Demonstrates how to use Intel DOM parsing validation XPath and XSLT functionality in an sample workflow of online book purchasing Shows how to use Intel XPath and validation capabilities on a SOAP message 24 3 Using the Intel XML Parsing Accelerator The Intel XML Parsing Accelerator for C C environment parses XML data as sequences of events the SAX model as DOM nodes or as internal data streams and can evaluate input data against a set of constraints by using the Intel XML Schema Accelerator Parsing Data in SAX Mode To parse a document in the SAX mode you need to define the set of actions to be executed when a certain part of an XML document is parsed The Intel XML Parsing Accelerator supports an interface that provides events similar to those defined in the ContentHandle interface of the SAX 2 0 standard 5 To implement the event handle create a new event handler class inheriting from the ContentHandler class The ContentHandler class provides major required virtual methods for parsing events Your code can inherit from the class and implement the methods required for your application In Example 1 a new handler is created Examp

Download Pdf Manuals

image

Related Search

Related Contents

Electronica_RV_files/RDV 0MAN159B  Orealia|DESIGNER 1.5      Anemómetro PCE-THA 10  

Copyright © All rights reserved.
Failed to retrieve file