TransformerException: A location step was expected following the '/' or '//
I'm new to using the JAVA API to transform XML to HTML via XSLT
I am attempting to create an application that generates this html file. I can generate the file through the command line with no problems.
I don't know if it's because my folder name has a space in the path.
All help is appreciated. THANKS in advance.
Environment is WSAD. Xalan.jar, xsltc.jar, xercesImpl.jar have been included in the jars on the build path.
Java Code
public void createHTMLFile() {
TransformerFactory tFactory;
Transformer transformer;
String stylesheet = "C://Folder Name//Project//properties//inputXSL.xsl";
String sourceID = "C://Folder Name//Project//properties//inputXML.xml";
File outputHTML =
new File("C://Folder Name//Project//properties//index.html");
FileOutputStream os;
try {
tFactory = TransformerFactory.newInstance();
os = new FileOutputStream(outputHTML);
// Exception occurs here
transformer = tFactory.newTransformer(new StreamSource(stylesheet));
transformer.transform(new StreamSource(sourceID),
new StreamResult(os));
catch (Exception e) {
System.out.println(e.getMessage());
part of XSL File
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xalan="http://xml.apache.org/xslt">
<xsl:output method="html" encoding="UTF-8" />
Here's my complete code
XSL
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xalan="http://xml.apache.org/xslt">
<xsl:output method="html" encoding="UTF-8" />
<xsl:template match="/">
<html>
<head>
<title>HI315B</title>
</head>
<body>
<table bgcolor="black" width="100%" border="1">
<tr>
<td>
<div align="center">
<b>
<font size="6" color="#FFFF00">Data Monitoring System</font>
</b>
</div>
</td>
</tr>
</table>
<br />
<br />
<br />
<table width="100%">
<tr>
<td bgcolor="#000000" colspan="4">
<font color="#FF0000">
<b>
<font color="#FFFF00">Title Message</font>
</b>
</font>
</td>
</tr>
<tr>
<xsl:for-each select="/input/set/">
<td>
<xsl:value-of select="locationID" />
</td>
</xsl:for-each>
</tr>
<tr>
<xsl:for-each select="/input/set/">
<td>
<a>
<xsl:attribute name="href">
<xsl:value-of select="locationID" />
<xsl:text disable-output-escaping="yes">_</xsl:text>
<xsl:value-of select="setID" />
<xsl:text disable-output-escaping="yes">.pdf</xsl:text>
</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:value-of select="setID" />
</a>
</td>
</xsl:for-each>
</tr>
</table>
<br />
<center>
<font size="4">
<a href="./NotifierEmailLog.txt" target="_blank">Alert Message Log File</a>
</font>
</center>
</body>
</html>
</xsl:template>
</xsl:stylesheet>XML Code
<input>
<set>
<setID>9999999</setID>
<locationID>M3021A</locationID>
</set>
<set>
<setID>9999999</setID>
<locationID>M3021B</locationID>
</set>
<set>
<setID>9999999</setID>
<locationID>M3051A</locationID>
</set>
<set>
<setID>9999999</setID>
<locationID>M3051B</locationID>
</set>
<set>
<setID>9999999</setID>
<locationID>M3039A</locationID>
</set>
<set>
<setID>REF</setID>
<locationID>REF</locationID>
</set>
</input>
Similar Messages
-
I'm currently running ios 5 beta on my iphone 4 and when i woke up this morning my phone had decided to automatically update the software OTA. After connecting to wifi and switching on location i proceeded to follow the instructions 'slide to setup'. I was informed that it may take 3 minutes to activate phone but was then presented with the screen 'Could not Activate iphone', this is because the activation server is unavailable. Can anybody shed some light on this for me?
Many thanksCan anybody shed some light on this for me?
Not here. iOS5 beta is only available to registered developers, and discussing it publicly outside of the private developer forums is a violation of the non-disclosure agreement you signed to access the beta. -
when I try to install the 'GOOD for enterprise" app, I am getting error 0x100001 during retireve settings step. I followed the step of reloading the OS to fix this as suggested in another thread but even after that I have the same problem. Please help.
Regards,
Nagarajan Kadhiresanif you using the same port, maybe this issue caused by your kingmax
to make it fast, try your king max at other PC, if cant detect, please reformat your king max -
When I go to the password and security, there is no Select "Start" under the words "two-step verification" and follow the instructions on the screen
Hey Podducbnov,
Thanks for the question. It sounds like you are trying to setup Two-Step Verification. After logging into http://appleid.apple.com, click "Password & Security". At this time you will probably be prompted to answer your security questions, go ahead and do so. Afterwards, the top section has a "Get started…" link to setup Two-Step Verification:
Apple ID: Frequently asked questions about two-step verification for Apple ID
http://support.apple.com/kb/HT5570
Thanks,
Matt M. -
When trying to delete web pages from my history at the location bar drop-down area, I do as Firefox instructs by hitting the 'ctrl, shift, delete' keys but some web pages remain. Even if I highlight each page and hit delete, they remain. How can I eliminate these web pages?
If you visit a bookmarked site then that site will become a history item and shows as such in the location bar drop down list.
-
I'm trying to pull data from an Oracle database using SSIS. When I try to select a few fields from the source table, it returns the following error message:
[OLE DB Source [47]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14.
An OLE DB record is available. Source: "OraOLEDB" Hresult: 0x80040E14 Description: "ORA-01858: a non-numeric character was found where a numeric was expected".
An OLE DB record is available. Source: "OraOLEDB" Hresult: 0x80004005 Description: "ORA-01858: a non-numeric character was found where a numeric was expected".
The source columns are a combination of numeric and texts, and I've also tried selecting one of them, which didn't work. I'm using the Oracle client 11.2.0.1, and it works fine with any other data sources I have connected to so far. How can I resolve this
error?Hi H.James,
According to your description, the issue is a non-numeric character was found where a numeric was expected while pulling data from an Oracle database in SSIS.
Based on the error message, the issue should be you are comparing a number column to a non-number column in a query. Such as the query below (ConfID is a number, Sdate is a date):
where C.ConfID in (select C.Sdate
from Conference_C C
where C.Sdate < '1-July-12')
Besides, a default behavior for the Oracle OleDb Provider that change the NLS Date Format of the session to 'YYYY-MM-DD HH24:MI:SS can also cause the issue. For more details about this issue, please refer to the following blog:
http://blogs.msdn.com/b/dataaccesstechnologies/archive/2012/01/20/every-bug-is-a-microsoft-bug-until-proven-otherwise.aspx
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
I had to change computers and cannot access my old drive. iTunes shows me the list of songs but I cannot get most to play. Instead I get a message saying "cannot locate"
I have tried following the support tutorials but it still does not allow me to download my previous purchases.
I tried de-authorizing all computers and then re-authorizing this on but it still doesn't allow me to access most of my songs.It sounds like you might have broken links to your content. Either repair these by putting the files you've recovered where iTunes expects to find them or delete the broken entries then go to iTunes Store > Purchased > Music > Not on This Computer, and click the download links.
If you have an Apple device see also Recover your iTunes library from your iPod or iOS device.
tt2 -
Library info directory path contains a file where a folder was expected
Cannot reopen my Aperture library (Aperture 2) after successfully exporting a few images to desktop as jpegs and then closing Aperture. Tried to reopen Aperture and got the following message:
Library info directory path contains a file where a folder was expected.
The Aperture Library could not be created at “/Volumes/Data/Pictures/Aperture Library.aplibrary/Aperture.aplib”. Check the path and try again.
No idea what has happened here. Anyone know how to fix?
I have a referenced library on my data drive (4 drive Mac Pro) Data drive/d300 Masters folder/another sub folder/then all my images. Did nothing other than to adjust,crop and export images. Images all still there (can open in PS).Sounds strange.
Did you try to double click your "Aperture Library.aplibrary"?
Maybe trying to open backuped library...
Or creating a new library by pressing the alt key when clicking on the Aperture Dock icon. -
I need to free up space on my macbook pro as hard drive is full!! So with 20 000 photos/video clips and itunes I would like to move this to a external hard drive!
I have followed steps on apple support but when i get to the Change itunes media folder location and chosen external hard drive it will not let me access the new folder option ?? help?errrrrrrm!
Yes external drive shows up in finder on desk top and can change to in the media folder location thing!
My external hard drive is a WD Elements. I have no idea about permissions to the external? Do i Have to format external hard drive to a mac?
I am trying to follow the steps on the apple support page to transfer files (consolidate library etc) just cant get further down steps as the new folder option is greyed out!
Thanks for you help -
I followed the steps to restore to factory settings now I can't get back my info from a prior backup. My pads screen was frozen on the connect to iTunes I needed to restore. I had to setup my pad as if it was new. How do I acess my prior backup
Once again, KP is correct, but I just want to add that if you don't see the backup in the drop down menu on the summary page of iTunes when you choose the restore from backup option, then the backup is unfortunately gone. If you backup your computer, the iPad backup should probably be in that computer backup. I use Time Machine with my MacBook Pro and can access backups from months ago.
On a side note, I also archive backups from time to time. If you right click on a backup name in iTunes>Edit>Preferences>Devices (Windows) or iTunes>Preferences>Devices (Mac) you can save that backup or archive it. It will be date and time stamped. I have no idea why I do this to the degree that I do it, but I probably have 12-14 iPad backups archived in iTunes. -
Trying to manually install USB driver for Ipad2 in windows vista 32 bit. I have followed the steps to locate usbaapl.inf. but Windows vista says this is not compatible with my device. What do i do now?
If you encounter problems with Google play at downloading Firefox for Android try to download these builds: http://www.mozilla.org/en-US/firefox/channel/#firefox .
Please remember that you should enable for this the settings: allow installing app from other sources that Google Play -
hi, my new device was set up in the store that I bought it from. How can I transfer all old text messages over to my new device? I have followed the icloud back up steps on this page. Please help, thank you.
Its an iPhone 4
Message was edited by: zzziggy85Here is how
http://support.apple.com/kb/HT2109 -
was asked to update itunes last week and since then itunes won't open, un-installed it and followed the necessary steps then tryed to install it from scratch but still no luck. It says it has been successfully installed, but no sign of it on my computer.
See Troubleshooting issues with iTunes for Windows updates.
tt2 -
Im really confused. My ipod was giving the 13019 error message. I followed the steps, and it stopped giving me the error code but my music wont appear on my ipod. Any suggestions? Please help
Are you saying that the "Music" app is not present on your iPod Touch? Perhaps there is an issue with the restrictions on the iPod? If you're absolutely sure that the Music app is not present I would consider creating a backup of your iPod after syncing it with iTunes. I would then consider restoring it if this is the case.
-
Hi , My modem got zapped by lightning yesterday. My iMac still was able to power on when I tried it yesterday. Today the modem is replaced and internet is working, but now the computer will not power on. I followed the steps to reset SMC. Nothing. ??
Ouch, not much more you can do, I think you'll have to have it looked at.
Maybe you are looking for
-
Mac mini "Overtemp" signal and sleep received regularly.
mac mini "Overtemp" signal received regularly. been researching the regular "Overtemp signal" received by my mini (Mac Mini PPC G4/PowerMac 10,1, 1.42GHz, 1G RAM, Tiger 10.4.11) followed by forced sleep since around the time i updated adobe flash a m
-
FTR_SUBSCR Function Group Download in a EHP4 version
Hi Guys Im facing an upgrade from 4.6C to an Ecc 6.0 and unfortunally my client had the brilliant idea to install the EHP4 in your QAS system but ddnt installed in the DEV system... I dont need to mention that transporting the requests from DEV to QA
-
Help with treemap and other stuff
hi guys.. i m new to this forum.. and this is my first post....so if i act a little naive .....please bare with me. and if this is not the correct place to post ..i m sorry for that. i have an assignment to submit....i m getting the whole picture ...
-
Hello, I have a strange problem with a spreadsheet in Numbers for iPad and Numbers for Mac (both current versions). For some reason I can't scroll to the top of the table (it has less than 200 rows and 5 columns). My table has a fixed header row (r
-
Unable to access time machine backups after upgrade
I have an airport extreme with an USB disk that I've been using with my 10.8 system. I've decided to format and do a clean install of mavericks. After that even tough I can access the timemachine and see scroll with the mouse I can't use the arrows