This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: XSL-List Digest V4 #354


Sorry! It's in the .ent file:

<!--************************************************************
    styledefs.ent
    ****************************************************************

    ** This is a file with style ENTITY definitions.
    ** This file should be placed in the same directory as 
       the xsl stylesheets and their includes.

****************************************************************
****************************************************************-->
<!--********************|  IMAGES   |***************************-->
<!ENTITY spacerimg "&img_uri;/blank.gif">
<!--***************|  COMMON DEFINITIONS   |********************-->
<!-- base uris for Learning Network sites -->
<!ENTITY fd_uri "http://www.futuredex.com";>
<!-- base uris for web files: -->
<!ENTITY img_uri "/STATIC/futuredex/frontend/images">


Date: Sun, 12 May 2002 10:37:58 +0200
From: Joerg Heinicke <joerg.heinicke@gmx.de>
Subject: Re: [xsl] need an extra pair or two of eyes

Where is &img_uri; declared?

Joerg

Randall Gremillion schrieb:
> I have created a stylesheet that includes list of entities. Runining
> this through Resin, however, it chokes on resolving them.
> 
> Opening of stylesheet (it is a secondary or imported stylesheet):
> 
> <?xml version="1.0"?>
> <!DOCTYPE page [
>   <!ENTITY % styledefs SYSTEM "futuredex_ent.ent">
>   %styledefs;
> ]>
> <xsl:stylesheet xmlns:bebop="http://www.arsdigita.com/bebop/1.0";
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
> xmlns:cms="http://www.arsdigita.com/cms/1.0";
> xmlns:fdx="http://www.futuredex.com/1.0";
> xmlns:frontend="http://www.futuredex.com/1.0/frontend";>
> 	<xsl:output method="html" indent="yes"
> doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
> 	<xsl:strip-space elements="*"/>
> 	<!--VARIABLES-->
> 	<xsl:variable name="title">
> 		<xsl:value-of select="//bebop:title"/>
> 	</xsl:variable>
> 	<!--MAIN TEMPLATE-->
> 	<xsl:template match="bebop:page"
> xmlns:bebop="http://www.arsdigita.com/bebop/1.0";>
> 		<html>
> 			<xsl:call-template name="head"/>
> 			<body text="#000000" link="#336600"
> vlink="#669933" alink="336600" leftmargin="0" topmargin="0"
> marginwidth="0" marginheight="0"
>
onLoad="MM_preloadImages('&img_uri;/nav_top-matchdex-on.gif','&img_uri;/
>
nav_top-my_futuredex-on.gif','&img_uri;/nav_top-mam-on.gif','&img_uri;/n
>
av_top-events-on.gif','&img_uri;/nav_top-analytics-on.gif','&img_uri;/na
>
v_top-research-on.gif','&img_uri;/nav_top-search-on.gif','&img_uri;/nav_
>
top-home-on.gif','&img_uri;/nav_side-private-on.gif','&img_uri;/nav_side
>
-investors-on.gif','&img_uri;/nav_side-service-on.gif','&img_uri;/nav_si
>
de-advisors-on.gif','&img_uri;/nav_side-press-on.gif','&img_uri;/nav_sid
> e-what-on.gif','&img_uri;/nav_top-directory-on.gif')"
> background="&img_uri;/side-bg.gif">
> 
> xml file:
> 
>   <?xml version="1.0" encoding="UTF-8" ?> 
> - <bebop:page xmlns:bebop="http://www.arsdigita.com/bebop/1.0";>
>   <bebop:title>Futuredex</bebop:title> 
> - <frontend:container xmlns:frontend="http://www.futuredex.com/1.0";
> requestURI="/xml/" class="/">
> - <frontend:container requestURI="/xml/" class="/index">
>   <frontend:temporaryHomePage /> 
>   <fdx:user-status xmlns:fdx="http://www.futuredex.com/1.0";
> is-logged-in="true" fullname="Gee Eye" id="35181" /> 
>   </frontend:container>
>   </frontend:container>
>   </bebop:page>
> 
> Beginning of error message:
> 
> javax.xml.transform.TransformerConfigurationException
> 
> com.caucho.xml.XmlParseException:
>
file:/c:/cygwin/home/grenma/resin-2.0.5/webapps/acs/packages/frontend/xs
> l/FDPage.xsl:17: expected local reference at `&img_uri;'
> 	at com.caucho.xml.XmlParser.error(XmlParser.java:2549)
> 	at com.caucho.xml.XmlParser.parseValue(XmlParser.java:1131)
> 	at com.caucho.xml.XmlParser.parseAttributes(XmlParser.java:666)
> 
> Any help is greatly appreciated.
> 
> Sincerely,
> Randall Gremillion


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

------------------------------

Date: Sun, 12 May 2002 10:41:28 +0200
From: Joerg Heinicke <joerg.heinicke@gmx.de>
Subject: Re: [xsl] Can i have one XML referring to 2 XSL's??

No, but you can import or include a second stylesheet.

Example:

XML

<page>
   <body>
     <table>
       ...
     </table>
   </body>
   <footer/>
</page>



XSL

<xsl:import href="footer.xsl"/>

<xsl:template match="page">
   <html>
     <head><title>test</title></head>
     <xsl:apply-templates/>
   </html>
</xsl:template>

<xsl:template match="body">
   <body>
     <xsl:apply-templates/>
   </body>
</xsl:template>

<xsl:template match="table">
   ...
</xsl:template>



footer.xsl

<xsl:template match="footer">
   This is the footer.
</xsl:template>

Regards,

Joerg


Suman.Sathyanarayan@itsindia.com schrieb:
> Hi ,
> 
> I have a footer in all my screens.
> The footer is to be generated from an XML transformation.
> So the top XML uses one stylesheet
> and the bottom one needs to use another stylesheet.
> 
> So that i can have one file and include it evrywhere.
> 
> Basically these XML's and XSL's are generated by JSP's
> So what i mean to say is that JSP's *** out put ***XML's and XSL's
> 
> 
>>All screens have a common footer.
>>i dont want to use frames.
>>Can one XML refer to 2 stylesheets ???????
> 
> 
> How,
> Please reply,
> 
> Suman


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

------------------------------

Date: Sun, 12 May 2002 03:11:38 -0700
From: Robert Koberg <rob@koberg.com>
Subject: Re: [xsl] need an extra pair or two of eyes

Hi Randall,

A different approach might be to use a global variables XSL where you 
assign these values and include it with your primary XSL. A good thing 
about this approach is you can make decisions at transformation time, 
for example:

<!-- global_defintions.xsl -->
<!-- pass in param to transform -->
<xsl:param name="lang"/>

<xsl:variable name="img_uri">
   <xsl:choose>
      <xsl:when test="$lang='es'">
         <xsl:text>/images/spanish/</xsl:text>
      </xsl:when>
      <xsl:otherwise>
         <xsl:text>/images/</xsl:text>
      </xsl:otherwise>
   </xsl:choose>
</xsl:variable>

best,
- -Rob




Randall Gremillion wrote:

>I have created a stylesheet that includes list of entities. Runining
>this through Resin, however, it chokes on resolving them.
>
>Opening of stylesheet (it is a secondary or imported stylesheet):
>
><?xml version="1.0"?>
><!DOCTYPE page [
>  <!ENTITY % styledefs SYSTEM "futuredex_ent.ent">
>  %styledefs;
>]>
><xsl:stylesheet xmlns:bebop="http://www.arsdigita.com/bebop/1.0";
>xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
>xmlns:cms="http://www.arsdigita.com/cms/1.0";
>xmlns:fdx="http://www.futuredex.com/1.0";
>xmlns:frontend="http://www.futuredex.com/1.0/frontend";>
>	<xsl:output method="html" indent="yes"
>doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
>	<xsl:strip-space elements="*"/>
>	<!--VARIABLES-->
>	<xsl:variable name="title">
>		<xsl:value-of select="//bebop:title"/>
>	</xsl:variable>
>	<!--MAIN TEMPLATE-->
>	<xsl:template match="bebop:page"
>xmlns:bebop="http://www.arsdigita.com/bebop/1.0";>
>		<html>
>			<xsl:call-template name="head"/>
>			<body text="#000000" link="#336600"
>vlink="#669933" alink="336600" leftmargin="0" topmargin="0"
>marginwidth="0" marginheight="0"
>onLoad="MM_preloadImages('&img_uri;/nav_top-matchdex-on.gif','&img_uri;
/
>nav_top-my_futuredex-on.gif','&img_uri;/nav_top-mam-on.gif','&img_uri;/
n
>av_top-events-on.gif','&img_uri;/nav_top-analytics-on.gif','&img_uri;/n
a
>v_top-research-on.gif','&img_uri;/nav_top-search-on.gif','&img_uri;/nav
_
>top-home-on.gif','&img_uri;/nav_side-private-on.gif','&img_uri;/nav_sid
e
>-investors-on.gif','&img_uri;/nav_side-service-on.gif','&img_uri;/nav_s
i
>de-advisors-on.gif','&img_uri;/nav_side-press-on.gif','&img_uri;/nav_si
d
>e-what-on.gif','&img_uri;/nav_top-directory-on.gif')"
>background="&img_uri;/side-bg.gif">
>
>xml file:
>
>  <?xml version="1.0" encoding="UTF-8" ?> - <bebop:page
xmlns:bebop="http://www.arsdigita.com/bebop/1.0";>
>  <bebop:title>Futuredex</bebop:title> - <frontend:container
xmlns:frontend="http://www.futuredex.com/1.0";
>requestURI="/xml/" class="/">
>- <frontend:container requestURI="/xml/" class="/index">
>  <frontend:temporaryHomePage />   <fdx:user-status
xmlns:fdx="http://www.futuredex.com/1.0";
>is-logged-in="true" fullname="Gee Eye" id="35181" />
</frontend:container>
>  </frontend:container>
>  </bebop:page>
>
>Beginning of error message:
>
>javax.xml.transform.TransformerConfigurationException
>
>com.caucho.xml.XmlParseException:
>file:/c:/cygwin/home/grenma/resin-2.0.5/webapps/acs/packages/frontend/x
s
>l/FDPage.xsl:17: expected local reference at `&img_uri;'
>	at com.caucho.xml.XmlParser.error(XmlParser.java:2549)
>	at com.caucho.xml.XmlParser.parseValue(XmlParser.java:1131)
>	at com.caucho.xml.XmlParser.parseAttributes(XmlParser.java:666)
>
>Any help is greatly appreciated.
>
>Sincerely,
>Randall Gremillion
>
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>  
>



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

------------------------------

Date: Sun, 12 May 2002 20:41:10 +0200
From: Dan Holmsand <holmsand@myrealbox.com>
Subject: Re: [xsl] XSLT/XPath 2.0 (was "Identifying two tags...")

Hi Jeni,

Jeni Tennison wrote:
 > I have the feeling that much of what makes XPath/XSLT 2.0 seem
 > complicated is simply that it hasn't been described well. If you're
 > had your head buried in the details for months, then it's often hard
 > to write it down without skipping over the assumptions that you've
 > come to take for granted, or spending too long on the exceptional,
 > difficult cases. Again, we can help here by asking the dumb
questions,
 > like "what's the difference between 'treat' and 'assert'?"

You're probably right. I feel I have some ways to go until I reach dumb 
questions like that, though. Good one.

 > The PSVI is the stuff that you get out of validating an instance
 > document with an XML Schema. You know that if you validate an
instance
 > against a DTD, it's different from what you get if you look at the
 > instance without the DTD? With the DTD, you get additional defaulted
 > attributes, plus you get information about the types of attributes,
 > like "this is an ID attribute". In some data models, you also get the
 > element and attribute declarations, so you can refer to them later
on.

Well, I think I've got these basics on the PSVI. It seems to me that the

spec describe using an XML Schema to define a transformation from XML to

some other language, with some sort of named "structs" and an abundance 
of "properties" for these structs and their members. Sort of like JAXB 
does, but to "PSVI" instead of to "Java", and at the same time keeping 
the underlying infoset (I may be totally wrong here, I admit...).

I guess that I have two problems in understanding this: this other 
language seems to be designed by descendants of Heidegger and Roland 
Barthes, or someone else feeling that using words already used by others

is a sign of weakness (I mean: "in the post-schema-validation infoset 
the attribute information item may, at processor option, have a property

attribute declaration" which is "An item isomorphic to the declaration 
component itself."). Heidegger couldn't have said it better.

But I guess that my big problem is that I don't get what this new (and 
apparently rich) language is good for. That, of course, does make 
understanding impossible (in the same way you can't very well understand

what a chair is if you're not familiar with "sitting").

 > I found that looking at the PSVI output of XSV
 > (http://www.ltg.ed.ac.uk/~ht/xsv-status.html), which is described at
 > http://www.w3.org/2001/05/serialized-infoset-schema.html, helped to
 > visualise what it looked like; just remember that it wouldn't
normally
 > be passed around as an XML structure!

Thanks! That helps a bit (and, yes, I do hope that this representation 
doesn't become canonical :-) ).

But it doesn't really help me cry out neither that "Wow, this is really 
useful. I wish all xml could be transformed into this." nor that "Gee. I

really, really wish that this could become the foundation of XPath/XSLT.

That would really make XSLT simpler to understand and use.". If 
anything, it makes the question "What on earth is this good for?" come 
to mind.

I do hope that this will dawn on me, eventually... (And I must admit 
that it is a tempting intellectual challenge: as a book title "XML and 
Data Structures the Heidegger Way: Being-in-the-world as it relates to 
post-schema-validation infosets" is almost irresistible...).

Thanks again,

/dan


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

------------------------------

Date: Mon, 13 May 2002 02:20:06 +0530
From: "Suresh Babu" <sbkoya21@sify.com>
Subject: [xsl] Filtering nodes

Hello group,

I have a simple XML like

 <Root>
     <Record Name="R1">
	<Record Name="L1">
		<Leaf Name="text"/>
	</Record>
	<Record>
		<Record Name="L2">
			<Leaf Name="text"/>
		</Record>
	</Record>
	<Record Name="R2">
		<Record>
			<Record>
				<Record>
					<Record Name="LL1">
						<Leaf Name="text"/>
					</Record>
					<Record Name="LL2">
						<Leaf Name="text"/>
					</Record>
				</Record>
			</Record>
		</Record>
	</Record>
 </Root>

To transform it to a simple structure like
<Record Name="R1">
	<Leaf Name="L1"/>
	<Leaf Name="L2"/>
	<Record Name="R2>
		<Leaf Name="LL1"/>
		<Leaf Name="LL2"/>
	</Record>
</Record>

Could any one suggest ways to filter the dummy record nodes under R1 and
R2
and display the Leaf nodes under R1 and R2.

For displaying the field nodes under a specific record I used the keys
function to select the "Record" elements with a "Leaf" element and
having
attribute "Name" value "text" as follows:
 <xsl:key name="leaf-nodes" match="Record" use="Leaf/@Name"/>

This is fine for R2 but fails for R1 in which case it is diplaying all
the
fields in R2 also.

Could some correct the keys expression/suggest a better way for doing
this.

Thanks and regards,
Suresh









 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

------------------------------

Date: Mon, 13 May 2002 11:04:37 +1000
From: Ben Leighton <Ben.Leighton@wizardis.com.au>
Subject: [xsl] limitations of xsl:comment

Hi,

Im confused as to why <xsl:comment> only allows content that generates
text nodes ie. it excludes content that generates elements / attributes
etc.

My XML editors allow (ie well formed) XML like:

<Top>
<!-- <Tag> </Tag> -->
</Top>

Can someone indicate why this is the case and whether its O.K for me to
force creation of <!-- and --> around xml using something like
<![CDATA[<!--]]>?

thanks,
:) Ben


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

------------------------------

Date: Sun, 12 May 2002 18:59:19 -0700
From: "Stuart Celarier" <stuart@ferncrk.com>
Subject: RE: [xsl] XSLT/XPath 2.0 (was "Identifying two tags...")

Let me try offering some perspective on what I think specifications are
and are not.

The W3C specifications are designed primarily for use by implementers,
language lawyers and their ilk, who need to be able to determine if they
have truly conformed to the requirements of the specification. 

Specifications and standards are not intended to be textbooks or good
exposition. Just try reading the ANSI/ISO C++ Standard. It is darn good
as a specification, in that it is (generally) straightforward to tell if
a C++ compiler conforms to the Standard; but it would be a dreadful way
to learn to program in C++.

The language of specifications is necessarily complex and specific. I
don't think that their use of language is contrived, gratuitous, or a
sign of some pretension to erudition. The comparison to Martin Heidegger
isn't particularly apt, other than to say in both cases that the writing
is dense and strives to be precise. If you see that as obfuscation, you
may be missing the point. If you think that makes specifications hard to
read, you're not alone, brother.

Cheers,
Stuart

- -----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com] On Behalf Of Dan Holmsand

I guess that I have two problems in understanding this: this other 
language seems to be designed by descendants of Heidegger and Roland 
Barthes, or someone else feeling that using words already used by others

is a sign of weakness (I mean: "in the post-schema-validation infoset 
the attribute information item may, at processor option, have a property

attribute declaration" which is "An item isomorphic to the declaration 
component itself."). Heidegger couldn't have said it better.

But I guess that my big problem is that I don't get what this new (and 
apparently rich) language is good for. That, of course, does make 
understanding impossible (in the same way you can't very well understand

what a chair is if you're not familiar with "sitting").




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

------------------------------

Date: Sun, 12 May 2002 19:15:39 -0700
From: "Stuart Celarier" <stuart@ferncrk.com>
Subject: RE: [xsl] limitations of xsl:comment

A comment in XML consists of character data, see the XML specification,
2.5, Comments, http://www.w3.org/TR/2000/REC-xml-20001006#dt-comment,
for details. Comments have no children, they are straight text.

When you place what _looks_ like XML markup in you comment, it is still
just text, so the comment <!-- <Tag> </Tag> --> does not include a Tag
element as a child, just a bunch of characters happen to resemble
markup. Check out the sample comment in the XML specification (link
above) and notice that its contents are not well-formed XML.

I am not sure I understand what your second question is getting at
regarding comments and CDATA sections. This may help. Comments are not
part of the data expressed by an XML document. In fact XML parsers are
free to drop comments when constructing a DOM from an XML document.
OTOH, a CDATA section indicates that the enclosed characters are to be
interpreted literally, and not to be construed as markup. In the case of
both a comment and a CDATA section, the contents are not taken as part
of the markup. However, the contents of a CDATA section are part of the
text data of the document, while the contents of a comment are not part
of the data of the document.

Cheers,
Stuart


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

------------------------------

End of XSL-List Digest V4 #354
******************************




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]