Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 20th, 2009, 11:34 PM
Registered User
 
Join Date: May 2009
Posts: 6
Thanks: 2
Thanked 0 Times in 0 Posts
Default Saxon-PE 9.2.0.2: Content is not allowed in prolog.

I am trying to run the XSLT below against a comma delimited log file but get a "Content is not allowed in prolog from Saxon-PE 9.2.0.2". I am running this from inside oXygen.

Any insights greatly appreciated,

Chirstopher


Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="2.0">
    
    <xsl:param name="input-uri" as="xs:string"/>
    <xsl:output indent="yes"/>
    
    <xsl:template name="main">
        <xsl:variable name="in" select="unparsed-text($input-uri, 'iso-8859-1')"/>

        <Log>
        <xsl:analyze-string select="$in"
            regex="^([^,]+,)([^,]+,)(&quot;(([0-9]{4})|([A-Z][0-9])|())&quot;,)(&quot;(([a-zA-Z]{3}[0-9])|(SERVER)|(EVS_SRV))&quot;,)(&quot;[0-9_a-zA-Z]+&quot;,)(&quot;[^&quot;]+&quot;)" flags="m">
            <xsl:matching-substring>
                <LogEntry>
                    <time>
                        <xsl:value-of select="regex-group(1)"/>
                    </time>
                    <DuplicateTime>
                        <xsl:value-of select="regex-group(2)"/>
                    </DuplicateTime>
                    <Employee>
                        <xsl:value-of select="regex-group(4)"/>
                    </Employee>
                    <Device>
                        <xsl:value-of select="regex-group(5)"/>
                    </Device>
                    <Action>
                        <xsl:value-of select="regex-group(7)"/>
                    </Action>
                    <Description>
                        <xsl:value-of select="regex-group(9)"/>
                    </Description>
                </LogEntry>
            </xsl:matching-substring>
        </xsl:analyze-string>
        </Log>
    </xsl:template>

</xsl:stylesheet>
 
Old November 21st, 2009, 12:34 AM
Registered User
 
Join Date: May 2009
Posts: 6
Thanks: 2
Thanked 0 Times in 0 Posts
Default Never mind . . .

As I soon discovered it is an idiosyncrasy of Oxygen. I was using an input parameter and just needed a dumby xml file to point the XML input to.

My bad





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error - Content is not allowed in prolog. --- SOS nkolli007 XSLT 12 March 19th, 2012 08:58 AM
Integrating C# with prolog and/or scheme. konichiwa2x C# 2008 aka C# 3.0 0 February 23rd, 2009 02:15 AM
Using basic C code in Prolog Ruman29 C++ Programming 0 March 11th, 2007 01:22 PM
Duplicating files in Prolog Ruman29 Other Programming Languages 0 March 8th, 2007 05:27 PM
Reading input from files PROLOG Ruman29 Other Programming Languages 0 March 8th, 2007 12:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.