xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Pass the value for xmlns:schemaLocation as a variable? Possible?


Subject: RE: [xsl] Pass the value for xmlns:schemaLocation as a variable? Possible?
From: "Khorasani, Houman" <houman_khorasani@xxxxxxxxxxxxxx>
Date: Thu, 20 Oct 2005 15:16:23 +0100

Sorry I had messed up the header. But I got what you meant.

Thanks
Houman


-----Original Message-----
From: Michael Kay [mailto:mike@xxxxxxxxxxxx]
Sent: 19 October 2005 16:17
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] Pass the value for xmlns:schemaLocation as a
variable? Possible?

>
> I have this following XSL.
>
> <ReportRequest
>  xmlns="http://www.test.com/bta"
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xmlns:schemaLocation="http://www.test.com/bta
> /home/PS_ReportRequest.xsd">
> ...
> </ReportRequest>

Are you sure it's "an XSL" (meaning a stylesheet, presumably?) - because
it
doesn't look like one.

And it should be xsi:schemaLocation.

xsi:schemaLocation is just another attribute as far as XSLT is concerned
so
you can generate it using an attribute value template, as

xsi:schemaLocation="{$var}"

Michael Kay
http://www.saxonica.com/


>
>
> I would like to pass the path for the XSD file as a parameter to the
> XSLT.
>
> For example I have this XSL file (called abc.xsl), which contains the
> path to the XSD:
>
>
> XML:
> <?xml version="1.0" encoding="UTF-8"?>
> <param>/home/PS_ReportRequest.xsd</param>
>
> -------------------------------------------------
>
> XSLT:
> <ReportRequest
>  xmlns="http://www.test.com/bta"
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xmlns:schemaLocation="$param">
>
> ...
> </ReportRequest>
>
>
> I can't do a <xsl:value-of "param"/> instead of $param. Declaring a
> variable is also not possible because the spot I can use XSL is after
> the header.  So how can I do that?
>
> Any idea?
>
> Mnay thanks
> Houman


Current Thread
Keywords
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor