[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-cvs
Subject:    svn commit: r949863 - /xerces/java/trunk/docs/faq-pcfp.xml
From:       mrglavas () apache ! org
Date:       2010-05-31 20:59:29
Message-ID: 20100531205929.4BB2023889FA () eris ! apache ! org
[Download RAW message or body]

Author: mrglavas
Date: Mon May 31 20:59:28 2010
New Revision: 949863

URL: http://svn.apache.org/viewvc?rev=949863&view=rev
Log:
Adding a section which describes how to create an XML Schema 1.1 SchemaFactory.

Modified:
    xerces/java/trunk/docs/faq-pcfp.xml

Modified: xerces/java/trunk/docs/faq-pcfp.xml
URL: http://svn.apache.org/viewvc/xerces/java/trunk/docs/faq-pcfp.xml?rev=949863&r1=949862&r2=949863&view=diff
 ==============================================================================
--- xerces/java/trunk/docs/faq-pcfp.xml (original)
+++ xerces/java/trunk/docs/faq-pcfp.xml Mon May 31 20:59:28 2010
@@ -118,7 +118,24 @@ DocumentBuilder db = dbf.newDocumentBuil
 
 ...
 </source>
-    
+   <p>
+    Changing the value of the schema language parameter passed to \
<code>SchemaFactory.newInstance()</code> +    to \
<code>http://www.w3.org/XML/XMLSchema/v1.1</code> will create a processor which \
supports XML Schema 1.1. +   </p>
+   <source>import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+
+...
+
+StreamSource[] sources = /* created by your application */;
+
+SchemaFactory factory = 
+    SchemaFactory.newInstance("http://www.w3.org/XML/XMLSchema/v1.1");
+Schema schema = factory.newSchema(sources);
+
+...
+</source>  
    <p>
     Another option is to use the JAXP schema language property defined by JAXP 1.2. \
                If the schema
     language property has been set to <code>http://www.w3.org/2001/XMLSchema</code>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic