<?xml version="1.0" encoding="utf-8"?>
<xliff
xmlns:sdl="http://sdl.com/FileTypes/SdlXliff/1.0" version="1.2"
sdl:version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="urn:oasis:names:tc:xliff:document:1.2">
I have tried without the sdl or xsl namespace, but then I get other
parsing errors.
What am I doing wrong here?
You have a duplicate attribute ("version").
I think this is a case where the error message really is helpful, isn't it?
I had thought indeed that the "version=1.0 may be the cause of my
problem because the line/column information pointed at it, but if I
delete the version attribute I get the error message:
"Required attribute '{http://www.w3.org/1999/XSL/Transform}version' is
missing."
If I just modify it I get a "duplicate attribute " error message.
I do not really understand what the problem is.
> I had thought indeed that the "version=1.0 may be the cause of my
> problem because the line/column information pointed at it, but if I
> delete the version attribute I get the error message:
> "Required attribute '{http://www.w3.org/1999/XSL/Transform}version' is
> missing."
> If I just modify it I get a "duplicate attribute " error message.
> I do not really understand what the problem is.
If you want to write an XSLT stylesheet with a literal result element as
the root element then it has to have an xsl:version attribute in the
namespace http://www.w3.org/1999/XSL/Transform e.g.
<xliff
xmlns:sdl="http://sdl.com/FileTypes/SdlXliff/1.0" version="1.2"
sdl:version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0"
xmlns="urn:oasis:names:tc:xliff:document:1.2">
Or you need to write a stylesheet where the root element is
xsl:stylesheet (or xsl:transform) and then has a 'version' attribute in
no namespace.
--
Martin Honnen --- MVP XML
http://msmvps.com/blogs/martin_honnen/
You have 2 version attributes in the default (xmlns) namespace, and
may only have one.
So first you had 2 identical attributes (dfisallowed in XML) which is
what the parser is complaining about. Then you specfied a value "1.2"
for the version attribute, which again isn't valid. Probably a
cut+paste error, but you need to check closely what you're pasting.
It looks to me like your intention is to process the items as XSL, so
there should be a single version attribute which would be either
version="1.0"
or
version="2.0"
Those are the only valid values I'm aware of for XSLT, so next remove
the spare version="1.2" attribute first, then see if the stylesheet
parses when it contains version="1.0" only. Change if to "2.0" if you
are using XSLT2 procesing features.
HTH
Cheers - Neil
------------------------------------------------
Digital Media MVP : 2004-2009
http://mvp.support.microsoft.com/mvpfaqs