LISTSERV mailing list manager LISTSERV 16.0

Help for XML-L Archives


XML-L Archives

XML-L Archives


XML-L@LISTSERV.HEANET.IE


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

XML-L Home

XML-L Home

XML-L  August 2001

XML-L August 2001

Subject:

Re: error message in creating XSL file, using XML Spy

From:

Wendell Piez <[log in to unmask]>

Reply-To:

General discussion of Extensible Markup Language <[log in to unmask]>

Date:

Thu, 9 Aug 2001 15:42:56 -0400

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (93 lines)

Caleb,

Your last post clarifies a bit what you're doing wrong.

At 02:18 PM 8/9/01, you wrote:
>Gavin,
>       Thank you very much for your reply. I have a few questions as to your
>response. You said that part of my problem may have been due to problems
>with the *.xsd file. However, both my *.xsd file (which I myself wrote) as
>well as the *.xml file based on it were validated by XML Spy, and
>considered by the program to be valid. When you said that the problem might
>have resulted from there being no encasing tag, does that apply only to the
>XML file? I am currently trying to create a *.xsl file, not *.xml. Could
>you possibly explain a little bit further on what needs to be done?

The XSLT stylesheet (*.xsl) happens to be in XML syntax, but it won't be
valid to your schema, it does not need to declare the schema, and you
shouldn't try to validate it. The best way to "validate" a stylesheet is to
run it and test whether it transforms your input as expected.

>  I do
>not completely understand what the creation of the *.xsl file has to do
>with the *.xml file. Do the two have to be linked?

No, they don't: if you run the transformation in batch mode (for example,
within XML Spy) they can be associated through other means than a link in
the XML. It is not uncommon to place a processing instruction (e.g.
<?xml-stylesheet type="text/xsl" href="mystyle.xsl"?>) in your XML file so
that a browser, when it opens the XML, can find the stylesheet on its own:
but it's not mandatory and your process might not use it.

>  I thought that only the
>schema had to be linked to the XSL file, not the XML.

Nope, you have it backwards. What are you using as a how-to guide, anyway?

Basically the schema is itself analogous to a stylesheet: they are both
examples of "processing specifications". (Accordingly, some people are now
even using XSLT stylesheets to validate, instead of or in addition to
schemas.) As in:

XML + schema => output (error messages/warnings OR "good to go")

XML + stylesheet => output (XML, HTML, whatever)

So stylesheet processing and schema validation are separate processes, and
there's no direct relation between stylesheet (XSL) and schema. As separate
processes, they can be run separately or in parallel. More commonly, they
are chained: first you validate the document with the schema, just to see
if it's "correct"; then you process it with the stylesheet. It's like a QA
test on the gizmo to see if it will fit into the customer's blivit before
you mail it out. That way you don't get gizmos sent back with letters of
complaint: "this doesn't fit my blivit" (i.e. this XML doesn't work using
the stylesheet you gave me). You could "validate" it as easily (i.e. check
to confirm it works) by just running the stylesheet on it. But
schema-validation is usually better because it is more general-purpose.

>In the code below, would this tagging in the *.xml file be
>considered "encasing"? I tried it, but it still does not work...perhaps I
>misinterpeted your instructions.
>
><?xml version="1.0" encoding="UTF-8"?>
><?xml-stylesheet type="text/xsl"
>href="D:\downloads\exercises\Rbac\test_1.xsl"?>
><Application xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
>xsi:noNamespaceSchemaLocation="D:\some_directory\some_schema.xsd">
><Body_Info></Body_Info>
></Application>

I think the "encasing" thing is a red herring here (that was Gavin's
problem not yours). It looks like you are on the right track here. If this
doesn't validate, it's because your schema doesn't describe this document.
We would need to see the declarations in the schema to see what was wrong.
(Note that the stylesheet has nothing to do with any of this and you could
remove that xml-stylesheet instruction without any effect on the schema
validation.)

(PS: Gavin, if you want to sound like you know Greek, try saying "schemata" :-)

Good luck,
Wendell



======================================================================
Wendell Piez                            mailto:[log in to unmask]
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
   Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

February 2017
August 2016
June 2016
March 2016
January 2016
July 2014
April 2014
January 2014
July 2013
February 2013
September 2012
August 2012
October 2011
August 2011
June 2011
January 2011
November 2010
October 2010
July 2010
June 2010
March 2010
February 2010
January 2010
November 2009
September 2009
August 2009
July 2009
May 2009
March 2009
December 2008
October 2008
August 2008
May 2008
March 2008
February 2008
January 2008
December 2007
October 2007
August 2007
June 2007
March 2007
January 2007
December 2006
September 2006
July 2006
June 2006
April 2006
February 2006
January 2006
November 2005
September 2005
August 2005
July 2005
June 2005
May 2005
March 2005
January 2005
October 2004
August 2004
July 2004
June 2004
May 2004
March 2004
February 2004
January 2004
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
January 2001
December 2000
November 2000
October 2000
September 2000
August 2000
July 2000
June 2000
May 2000
April 2000
March 2000
February 2000
January 2000
December 1999
November 1999
October 1999
September 1999
August 1999
July 1999
June 1999
May 1999
April 1999
March 1999
February 1999
January 1999
December 1998
November 1998
October 1998
September 1998
August 1998
July 1998
June 1998
May 1998
April 1998
March 1998
February 1998
December 1997
November 1997
October 1997

ATOM RSS1 RSS2



LISTSERV.HEANET.IE

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager