Subject: RE: [xsl] Schema location in target XML document From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> Date: Tue, 23 Apr 2002 08:52:51 +0100 |
If you wrote a literal result element: <courses xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\Docs\CorpPortal\clschema.xsd"> then the attributes would be copied through to the output. This doesn't work with xsl:element, however. Extra attributes on xsl:element (and other elements in the XSLT namespace) are an error if they are in the null namespace, and are ignored if in a non-null namespace. Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of > Uslu, Cihan Y > (MED) > Sent: 22 April 2002 21:11 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] Schema location in target XML document > > > Hi, > I get my data from OracleDB, create the XML String, then > apply the XSLT > script, and then I need to validate it against our schema, > this is where > i'm not clear. How can I make it sure that I'm validating against a > schema located in a URL? Any help is appreciated. > > Cihan > > > This is what I have in my XSLT script: > --------------------------------- > <xsl:transform version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > <xsl:output method="xml" indent = "yes"/> > <xsl:template match="/"> > <xsl:element name="courses" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xsi:noNamespaceSchemaLocation="D:\Docs\CorpPortal\clschema.xsd"> > <xsl:apply-templates /> > </xsl:element> > </xsl:template> > ------------------------ > > > This code doesnt put the schema location in target XML. This is the > output I get: > ------------------------------ > <?xml version="1.0" encoding="UTF-16"?> > <courses> > <course compid="11" busunitid="66" coursenumber="C/AMX4"> > -------------------------- > > This is what I should be getting in target XML > -------------------- > <?xml version="1.0" encoding="UTF-16"?> > <courses xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:noNamespaceSchemaLocation="http://webd01.corporate.ge.com/ > learningpo > rt/learningportal/schema/CLSchema.xsd"> > <course compid="11" busunitid="66" coursenumber="C/AMX4"> > -------------------- > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Schema location in target XML, Uslu, Cihan Y (MED) | Thread | RE: [xsl] Schema location in target, Oleg Tkachenko |
RE: [xsl] doubt regarding position(, Sachidanandam E K | Date | RE: [xsl] doubt regarding position(, Michael Kay |
Month |