Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316690 - End tag for the metdata
Summary: End tag for the metdata
Status: RESOLVED WORKSFORME
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xsl (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: wst.xsl-triaged CLA
QA Contact: David Carver CLA
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2010-06-12 18:34 EDT by Dan Nicoara CLA
Modified: 2011-01-22 08:49 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Nicoara CLA 2010-06-12 18:34:06 EDT
Build Identifier: 20100218-1602

when i use the xsl file to generate html code using a xml the metadata end tag is not inserted.

Reproducible: Always
Comment 1 Nitin Dahyabhai CLA 2010-06-13 21:32:04 EDT
This would require far more detail than is here now, at minimum an example XML and XSL file showing this behavior.  Please reopen when you can attach them.
Comment 2 Dan Nicoara CLA 2010-06-14 15:04:16 EDT
I`ve got an XML file (books.xml) with the following structure : 

<?xml version="1.0" encoding="UTF-8"?>

<book>
	<title>Title</title>
	<author>Author</author>
</book>

And the I`m creating a XSL (parseBooks.xsl) file to parse the first one : 

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:template match="book">
	<html>
		<head>
			<title></title>
		</head>
		
		<body>
			<xsl:value-of select="title"></xsl:value-of>
			<xsl:value-of select="author"></xsl:value-of>
		</body>
	</html>
    </xsl:template>
</xsl:stylesheet>

On the XSL file I right-click go to Run-As -> XSL Transformation. After this I`ll select the books.xml input file and it creates a new file called books.out.xml and that one has an error called : 

The element type "META" must be terminated by the matching end-tag "</META>".	books.out.xml	/WebApp/WebContent	line 5	XML Problem

So that`s why I wrote to you.
Comment 3 David Carver CLA 2010-06-14 15:20:15 EDT
(In reply to comment #2)
> I`ve got an XML file (books.xml) with the following structure : 
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <book>
>     <title>Title</title>
>     <author>Author</author>
> </book>
> 
> And the I`m creating a XSL (parseBooks.xsl) file to parse the first one : 
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> 
>     <xsl:template match="book">
>     <html>
>         <head>
>             <title></title>
>         </head>
> 
>         <body>
>             <xsl:value-of select="title"></xsl:value-of>
>             <xsl:value-of select="author"></xsl:value-of>
>         </body>
>     </html>
>     </xsl:template>
> </xsl:stylesheet>
> 
> On the XSL file I right-click go to Run-As -> XSL Transformation. After this
> I`ll select the books.xml input file and it creates a new file called
> books.out.xml and that one has an error called : 
> 
> The element type "META" must be terminated by the matching end-tag "</META>".  
>  books.out.xml    /WebApp/WebContent    line 5    XML Problem

If you ouput your XSL file as HTML, the META tag doesn't have to have a corresponding out.

Change you output from book.out.xml to book.out.html and it should open it in the correct editor.

Also, you can make sure that it outputs valid HTML by using the appropriate output method in XSL.

<xsl:output method="html"/>

See XSLT FAQ for more info:

http://www.dpawson.co.uk/xsl/sect2/sect21.html



> 
> So that`s why I wrote to you.
Comment 4 Jesper Moller CLA 2011-01-21 16:37:14 EST
Dan,
does Davids explanation help, or are you still having a problem?

If so, please explain -- otherwise, I'l like to close this bug, or at least turn it into an enhancement request for automatically setting the extension for the output file based on the output method of the transformation or stylesheet.
Comment 5 Dan Nicoara CLA 2011-01-22 06:09:42 EST
The explanation hepled me a lot. Thank you very much ! Have a great day !
Comment 6 David Carver CLA 2011-01-22 08:49:23 EST
Resolving as Worksforme as it's not an issue.   In general we need to do some enhancments with the launching framework.